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

79 lines
2.5 KiB
TypeScript
Raw Normal View History

// Module ID: 5699
// Function ID: 5700
// Name: TableRadioGroup
// Dependencies: [32, 19, 1074, 21, 5700, 5701, 5702, 2]
2026-07-20 16:05:17 +00:00
// Exports: TableRadioGroup
// Module 5699 (TableRadioGroup)
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
const require = fn;
let jsx = fn(21).jsx;
const context = noop.createContext({ selectedValue: null, onSelect: fn(1074).NOOP });
const size = fn(2);
const result = size.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);
_slicedToArray = undefined;
noop = undefined;
2026-08-24 06:08:38 +00:00
jsx = undefined;
let onSelect;
2026-08-24 06:08:38 +00:00
dependencyMap = tmp;
2026-07-29 08:29:29 +00:00
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
}
[tmp4, c2] = noop.useState(tmp2);
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
}
noop = tmp4;
2026-07-29 08:29:29 +00:00
const items = [undefined !== value, onChange, tmp4];
const imperativeHandle = obj.useImperativeHandle(groupRef, () => ({
2026-07-20 16:05:17 +00:00
setValue(arg0) {
if (!closure_1_1) {
_undefined(arg0);
2026-07-20 16:05:17 +00:00
}
if (onChange != null) {
2026-07-29 08:29:29 +00:00
tmp3(arg0);
2026-07-20 16:05:17 +00:00
}
},
getValue() {
return selectedValue;
2026-07-20 16:05:17 +00:00
}
}), items);
jsx = obj.useContext(onChange(5700).RedesignCompatContext);
2026-07-20 16:05:17 +00:00
const items1 = [undefined !== value, onChange];
onSelect = 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);
const items2 = [tmp4, onSelect];
const obj2 = { value: noop.useMemo(() => ({ selectedValue, onSelect }), items2), children: null };
const obj3 = { accessibilityRole: "radiogroup", accessibilityLabel, title, description, helperText, hasIcons, children: null };
const Children = obj.Children;
obj3.children = Children.map(children, (type) => {
if (!noop.isValidElement(type)) {
2026-07-20 16:05:17 +00:00
let tmp4 = null;
return tmp4;
}
tmp4 = type;
});
obj2.children = jsx(onChange(5701).TableRowGroup, { accessibilityRole: "radiogroup", accessibilityLabel, title, description, helperText, hasIcons, children: null });
return <onSelect.Provider value={noop.useMemo(() => ({ selectedValue, onSelect }), items2)}>{null}</onSelect.Provider>;
2026-07-20 16:05:17 +00:00
};