decord/source/design/components/TableRow/native/TableRadioGroup.native.tsx

107 lines
3 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8136
// Function ID: 8137
2026-07-20 16:05:17 +00:00
// Name: context
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 19, 676, 21, 5479, 5873, 8135, 2]
2026-07-20 16:05:17 +00:00
// Exports: TableRadioGroup
2026-08-25 06:04:03 +00:00
// Module 8136 (context)
2026-08-24 06:08:38 +00:00
import closure_2 from "_slicedToArray" /* 32 */;
import importAllResult from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c3 = importAllResult;
2026-07-23 10:11:24 +00:00
const context = importAllResult.createContext({ selectedValue: null, onSelect: require("ME").NOOP });
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("design/components/TableRow/native/TableRadioGroup.native.tsx");
2026-07-20 16:05:17 +00:00
export const TableRadioGroupContext = context;
export const TableRadioGroup = function TableRadioGroup(arg0) {
({ value, defaultValue, onChange } = arg0);
let callback;
2026-08-24 06:08:38 +00:00
importAllResult = undefined;
jsx = undefined;
2026-07-23 10:11:24 +00:00
callback = undefined;
2026-08-24 06:08:38 +00:00
dependencyMap = tmp;
2026-07-29 08:29:29 +00:00
let obj = importAllResult;
let tmp2 = null;
2026-07-20 16:05:17 +00:00
({ children, title, description, helperText, hasIcons, groupRef, accessibilityLabel } = arg0);
if (undefined === value) {
2026-07-29 08:29:29 +00:00
if (defaultValue == null) {
defaultValue = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2 = defaultValue;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
[tmp4, c2] = callback(importAllResult.useState(tmp2), 2);
2026-07-20 16:05:17 +00:00
if (undefined !== value) {
2026-07-29 08:29:29 +00:00
tmp4 = value;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp4 == null) {
tmp4 = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
importAllResult = tmp4;
const items = [undefined !== value, onChange, tmp4];
const imperativeHandle = obj.useImperativeHandle(groupRef, () => ({
2026-07-20 16:05:17 +00:00
setValue(arg0) {
2026-07-29 08:29:29 +00:00
if (!closure_1) {
callback(arg0);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (closure_0 != null) {
tmp3(arg0);
2026-07-20 16:05:17 +00:00
}
},
getValue() {
2026-07-29 08:29:29 +00:00
return closure_3;
2026-07-20 16:05:17 +00:00
}
}), items);
2026-08-25 06:04:03 +00:00
jsx = obj.useContext(onChange(5479).RedesignCompatContext);
2026-07-20 16:05:17 +00:00
const items1 = [undefined !== value, onChange];
2026-07-29 08:29:29 +00:00
callback = obj.useCallback((arg0) => {
2026-07-23 10:11:24 +00:00
if (!closure_1) {
2026-07-29 08:29:29 +00:00
_undefined(arg0);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (onChange != null) {
tmp3(arg0);
2026-07-20 16:05:17 +00:00
}
}, items1);
2026-07-29 08:29:29 +00:00
const items2 = [tmp4, callback];
obj = { value: obj.useMemo(() => ({ selectedValue: c3, onSelect: callback }), items2), children: null };
2026-08-24 06:08:38 +00:00
obj = {
accessibilityRole: "radiogroup",
accessibilityLabel,
title,
description,
helperText,
hasIcons,
children: Children.map(children, (type) => {
if (!_null.isValidElement(type)) {
let tmp4 = null;
return tmp4;
}
tmp4 = type;
})
};
Children = obj.Children;
2026-08-25 06:04:03 +00:00
obj[1] = jsx(onChange(5873).TableRowGroup, {
2026-08-24 06:08:38 +00:00
accessibilityRole: "radiogroup",
accessibilityLabel,
title,
description,
helperText,
hasIcons,
children: Children.map(children, (type) => {
if (!_null.isValidElement(type)) {
let tmp4 = null;
return tmp4;
}
tmp4 = type;
})
});
return <callback.Provider accessibilityRole="radiogroup" accessibilityLabel={accessibilityLabel} title={title} description={description} helperText={helperText} hasIcons={hasIcons}>{Children.map(children, (type) => {
if (!_null.isValidElement(type)) {
2026-07-20 16:05:17 +00:00
let tmp4 = null;
return tmp4;
}
tmp4 = type;
2026-08-24 06:08:38 +00:00
})}</callback.Provider>;
2026-07-20 16:05:17 +00:00
};