decord/source/design/components/TableRow/native/TableCheckboxRow.native.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

61 lines
2.2 KiB
TypeScript

// Module ID: 5690
// Function ID: 5691
// Name: TableCheckboxRow
// Dependencies: [19, 21, 4374, 4341, 4356, 5691, 5703, 2]
// Exports: TableCheckboxRow
// Module 5690 (TableCheckboxRow)
import native from "native" /* 4341 */;
import useA11yRolesNative from "useA11yRolesNative" /* 4356 */;
import ReanimatedRexport from "ReanimatedRexport" /* 4374 */;
import TableRow from "TableRow" /* 5691 */;
import noop from "module_19" /* 19 */;
const FormCheckbox = tmp2(5703);
require = fn;
const jsx = fn(21).jsx;
const size = fn(2);
let result = size.fileFinishedImporting("design/components/TableRow/native/TableCheckboxRow.native.tsx");
export const TableCheckboxRow = function TableCheckboxRow(checked) {
checked = checked.checked;
({ label, subLabel, disabled } = checked);
if (disabled === undefined) {
disabled = false;
}
const onPress = checked.onPress;
const merged = Object.assign(checked, Object.assign({ checked: 0, label: 0, subLabel: 0, disabled: 0, onPress: 0, accessibilityHint: 0 }));
const sharedValue = ReanimatedRexport.useSharedValue(0);
const items = [sharedValue];
const items1 = [onPress, sharedValue, checked];
const callback = noop.useCallback(() => {
const result = sharedValue.set(1);
}, items);
const callback1 = noop.useCallback(() => {
const result = sharedValue.set(0);
onPress(!checked);
}, items1);
const nodeText = native.getNodeText(label);
const nodeText1 = native.getNodeText(subLabel);
const checkboxA11yNative = useA11yRolesNative.useCheckboxA11yNative({ checked, disabled });
({ accessibilityRole, accessibilityState } = checkboxA11yNative);
const obj5 = {};
const merged1 = Object.assign(merged);
obj5.arrow = false;
obj5.label = label;
obj5.subLabel = subLabel;
obj5.disabled = disabled;
obj5.accessibilityState = accessibilityState;
obj5.accessible = true;
obj5.accessibilityRole = accessibilityRole;
let str = nodeText1;
if (nodeText1 == null) {
str = "";
}
obj5.accessibilityLabel = "" + nodeText + ", " + str;
obj5.accessibilityHint = checked.accessibilityHint;
obj5.onPressIn = callback;
obj5.onPress = callback1;
obj5.trailing = jsx(FormCheckbox.FormCheckbox, { checked });
return jsx(TableRow.TableRow, {});
};