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

66 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-07-31 08:44:05 +00:00
// Module ID: 7659
// Function ID: 7660
2026-07-20 16:05:17 +00:00
// Name: TableRadioRow
2026-07-31 08:44:05 +00:00
// Dependencies: [19, 21, 7660, 3899, 3911, 5224, 7661, 2]
2026-07-20 16:05:17 +00:00
// Exports: TableRadioRow
2026-07-31 08:44:05 +00:00
// Module 7659 (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-07-31 08:44:05 +00:00
const context = onSelect.useContext(require(7660) /* 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-07-31 08:44:05 +00:00
let tmp2Result = tmp2(3899);
2026-07-29 08:29:29 +00:00
const nodeText = tmp2Result.getNodeText(label);
2026-07-31 08:44:05 +00:00
tmp2Result = tmp2(3899);
2026-07-29 08:29:29 +00:00
const nodeText1 = tmp2Result.getNodeText(subLabel);
2026-07-31 08:44:05 +00:00
const radioA11yNative = require(3911) /* 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-07-31 08:44:05 +00:00
obj.trailing = jsx(require(7661) /* FormRadio */.FormRadio, { selected: legacyCompat_selected });
return jsx(require(5224) /* TableRowInner */.TableRow, {});
2026-07-20 16:05:17 +00:00
};