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

66 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-08-14 17:33:39 +00:00
// Module ID: 8050
// Function ID: 8051
2026-07-20 16:05:17 +00:00
// Name: TableRadioRow
2026-08-14 17:33:39 +00:00
// Dependencies: [19, 21, 8051, 4067, 4073, 5435, 8052, 2]
2026-07-20 16:05:17 +00:00
// Exports: TableRadioRow
2026-08-14 17:33:39 +00:00
// Module 8050 (TableRadioRow)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import { jsx } from "jsxProd";
let require = arg1;
const result = require("context").fileFinishedImporting("design/components/TableRow/native/TableRadioRow.native.tsx");
2026-07-20 16:05:17 +00:00
export const TableRadioRow = function TableRadioRow(value) {
let accessibilityRole;
let accessibilityState;
2026-07-23 10:11:24 +00:00
let dependencyMap;
2026-07-20 16:05:17 +00:00
let disabled;
let label;
let legacyCompat_selected;
let subLabel;
value = value.value;
2026-07-23 10:11:24 +00:00
const 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-14 17:33:39 +00:00
const context = onSelect.useContext(require(8051) /* context */.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-12 06:57:52 +00:00
let tmp2Result = tmp2(4067);
2026-07-29 08:29:29 +00:00
const nodeText = tmp2Result.getNodeText(label);
2026-08-12 06:57:52 +00:00
tmp2Result = tmp2(4067);
2026-07-29 08:29:29 +00:00
const nodeText1 = tmp2Result.getNodeText(subLabel);
2026-08-12 06:57:52 +00:00
const radioA11yNative = require(4073) /* 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-14 17:33:39 +00:00
obj.trailing = jsx(require(8052) /* FormRadio */.FormRadio, { selected: legacyCompat_selected });
return jsx(require(5435) /* TableRowInner */.TableRow, {});
2026-07-20 16:05:17 +00:00
};