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

92 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 8101
// Function ID: 8102
2026-07-20 16:05:17 +00:00
// Name: context
2026-08-15 05:55:55 +00:00
// Dependencies: [32, 19, 676, 21, 6939, 6286, 8100, 2]
2026-07-20 16:05:17 +00:00
// Exports: TableRadioGroup
2026-08-15 05:55:55 +00:00
// Module 8101 (context)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import importAllResult from "noop";
2026-07-23 10:11:24 +00:00
import { jsx } from "jsxProd";
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 });
const result = require("ME").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) {
let accessibilityLabel;
2026-07-29 08:29:29 +00:00
let c2;
2026-07-20 16:05:17 +00:00
let children;
let defaultValue;
let description;
let groupRef;
let hasIcons;
let helperText;
let onChange;
let title;
2026-07-29 08:29:29 +00:00
let tmp4;
2026-07-20 16:05:17 +00:00
let value;
({ value, defaultValue, onChange } = arg0);
let callback;
let importAllResult;
let jsx;
2026-07-23 10:11:24 +00:00
callback = undefined;
2026-07-20 16:05:17 +00:00
const 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-15 05:55:55 +00:00
jsx = obj.useContext(onChange(6939).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 };
obj = { accessibilityRole: "radiogroup", accessibilityLabel, title, description, helperText, hasIcons, children: null };
const Children = obj.Children;
obj[6] = Children.map(children, (type) => {
if (!_undefined2.isValidElement(type)) {
2026-07-20 16:05:17 +00:00
let tmp4 = null;
return tmp4;
}
tmp4 = type;
});
2026-08-15 05:55:55 +00:00
obj[1] = jsx(onChange(6286).TableRowGroup, { accessibilityRole: "radiogroup", accessibilityLabel, title, description, helperText, hasIcons, children: null });
2026-07-29 08:29:29 +00:00
return <callback.Provider accessibilityRole="radiogroup" accessibilityLabel={accessibilityLabel} title={title} description={description} helperText={helperText} hasIcons={hasIcons}>{null}</callback.Provider>;
2026-07-20 16:05:17 +00:00
};