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

64 lines
2.3 KiB
TypeScript
Raw Normal View History

// Module ID: 5769
// Function ID: 5770
2026-07-20 16:05:17 +00:00
// Name: TableRadioRow
// Dependencies: [19, 21, 5766, 4340, 4355, 5686, 5770, 2]
2026-07-20 16:05:17 +00:00
// Exports: TableRadioRow
// Module 5769 (TableRadioRow)
import native from "native" /* 4340 */;
import useA11yRolesNative from "useA11yRolesNative" /* 4355 */;
import TableRow from "TableRow" /* 5686 */;
import TableRadioGroup from "TableRadioGroup" /* 5766 */;
import FormRadio from "FormRadio" /* 5770 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("design/components/TableRow/native/TableRadioRow.native.tsx");
2026-07-20 16:05:17 +00:00
export const TableRadioRow = function TableRadioRow(value) {
value = value.value;
2026-08-24 06:08:38 +00:00
require = value;
2026-07-20 16:05:17 +00:00
({ label, subLabel, disabled } = value);
if (disabled === undefined) {
disabled = false;
}
2026-07-23 10:11:24 +00:00
({ legacyCompat_selected, legacyCompat_onPress: dependencyMap } = value);
const merged = Object.assign(value, Object.assign({ value: 0, label: 0, subLabel: 0, disabled: 0, accessibilityHint: 0, legacyCompat_selected: 0, legacyCompat_onPress: 0 }));
const context = noop.useContext(TableRadioGroup.TableRadioGroupContext);
const onSelect = context.onSelect;
2026-07-29 08:29:29 +00:00
if (legacyCompat_selected == null) {
2026-07-20 16:05:17 +00:00
legacyCompat_selected = context.selectedValue === value;
}
const nodeText = native.getNodeText(label);
const tmp2Result = native;
const nodeText1 = native.getNodeText(subLabel);
const tmp2Result3 = native;
const radioA11yNative = useA11yRolesNative.useRadioA11yNative({ selected: legacyCompat_selected, disabled });
2026-07-20 16:05:17 +00:00
({ accessibilityRole, accessibilityState } = radioA11yNative);
2026-07-29 08:29:29 +00:00
const obj = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
2026-07-29 08:29:29 +00:00
obj.arrow = false;
obj.label = label;
obj.subLabel = subLabel;
obj.disabled = disabled;
obj.accessibilityState = accessibilityState;
obj.accessible = true;
obj.accessibilityRole = accessibilityRole;
let str = nodeText1;
if (nodeText1 == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj.accessibilityLabel = "" + nodeText + ", " + str;
obj.accessibilityHint = value.accessibilityHint;
obj.onPress = function onPress(arg0) {
if (dependencyMap != null) {
2026-07-29 08:29:29 +00:00
tmp(arg0);
2026-07-20 16:05:17 +00:00
}
onSelect(value);
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
obj.trailing = jsx(FormRadio.FormRadio, { selected: legacyCompat_selected });
return jsx(TableRow.TableRow, {});
2026-07-20 16:05:17 +00:00
};