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

63 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-08-27 16:17:25 +00:00
// Module ID: 7626
// Function ID: 7627
2026-07-20 16:05:17 +00:00
// Name: TableRadioRow
2026-08-27 16:17:25 +00:00
// Dependencies: [19, 21, 7625, 4167, 4173, 5551, 7627, 2]
2026-07-20 16:05:17 +00:00
// Exports: TableRadioRow
2026-08-27 16:17:25 +00:00
// Module 7626 (TableRadioRow)
2026-08-26 06:04:24 +00:00
import useCheckboxA11yNative from "useCheckboxA11yNative" /* 4173 */;
2026-08-27 16:17:25 +00:00
import TableRowInner from "TableRowInner" /* 5551 */;
import context2 from "context" /* 7625 */;
import FormRadio from "FormRadio" /* 7627 */;
2026-08-24 06:08:38 +00:00
import closure_2 from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").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);
2026-07-29 08:29:29 +00:00
const merged = Object.assign(value, Object.create(null));
2026-07-23 10:11:24 +00:00
let onSelect;
2026-08-24 06:08:38 +00:00
const context = onSelect.useContext(context2.TableRadioGroupContext);
2026-07-23 10:11:24 +00:00
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;
}
2026-08-26 06:04:24 +00:00
let tmp2Result = tmp2(4167);
2026-07-29 08:29:29 +00:00
const nodeText = tmp2Result.getNodeText(label);
2026-08-26 06:04:24 +00:00
tmp2Result = tmp2(4167);
2026-07-29 08:29:29 +00:00
const nodeText1 = tmp2Result.getNodeText(subLabel);
2026-08-24 06:08:38 +00:00
const radioA11yNative = useCheckboxA11yNative.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 (closure_1 != null) {
tmp(arg0);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
onSelect(closure_0);
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(TableRowInner.TableRow, {});
2026-07-20 16:05:17 +00:00
};