63 lines
3.4 KiB
TypeScript
63 lines
3.4 KiB
TypeScript
/* Metro module 7987; source: design/components/TableRow/native/TableRadioRow.native.tsx; dependencies: [31, 33, 7988, 3862, 3874, 6238, 7989, 2] */
|
|
function _fun63527(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8165:6, offset: 0x01b84064, size: 133 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importAll(31) /* metro dependency 31 */;
|
|
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/TableRow/native/TableRadioRow.native.tsx');
|
|
exports.TableRadioRow = TableRadioRow;
|
|
}
|
|
|
|
function TableRadioRow(a0) { // fn#63528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8165:228, offset: 0x01b840e9, size: 501 bytes, params: 2, frame: 28
|
|
let value = a0.value;
|
|
const label = a0.label;
|
|
const subLabel = a0.subLabel;
|
|
let disabled = a0.disabled;
|
|
disabled = !(disabled === undefined) && disabled;
|
|
const accessibilityHint = a0.accessibilityHint;
|
|
const legacyCompat_selected = a0.legacyCompat_selected;
|
|
const env0_1 = a0.legacyCompat_onPress;
|
|
const object2 = {'value': 0, 'label': 0, 'subLabel': 0, 'disabled': 0, 'accessibilityHint': 0,
|
|
'legacyCompat_selected': 0, 'legacyCompat_onPress': 0};
|
|
silentSetPrototypeOf(object2, null, undefined);
|
|
const value3 = copyDataProperties({}, a0, object2, undefined);
|
|
let env0_2 = undefined;
|
|
const binding = env0_2;
|
|
const useContext = binding.useContext;
|
|
const TableRadioGroupContext = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroupContext;
|
|
const value5 = Reflect.apply(useContext, binding, [TableRadioGroupContext]);
|
|
const selectedValue = value5.selectedValue;
|
|
env0_2 = value5.onSelect;
|
|
const r7 = legacyCompat_selected ?? selectedValue === value;
|
|
value = require(3862) /* metro dependency 3862: native */;
|
|
value = value.getNodeText(label);
|
|
const nodeText = (require(3862) /* metro dependency 3862: native */).getNodeText(subLabel);
|
|
const {accessibilityRole,
|
|
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useRadioA11yNative({selected: r7,
|
|
disabled: disabled});
|
|
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
const tableRowProps = {...value3};
|
|
tableRowProps['arrow'] = false;
|
|
tableRowProps['label'] = label;
|
|
tableRowProps['subLabel'] = subLabel;
|
|
tableRowProps['disabled'] = disabled;
|
|
tableRowProps['accessibilityState'] = accessibilityState;
|
|
tableRowProps['accessible'] = true;
|
|
tableRowProps['accessibilityRole'] = accessibilityRole;
|
|
const value8 = '';
|
|
value = value8 + value + ', ' + (nodeText ?? value8);
|
|
tableRowProps['accessibilityLabel'] = value;
|
|
tableRowProps['accessibilityHint'] = accessibilityHint;
|
|
tableRowProps['onPress'] = function(a0) {
|
|
if (legacyCompat_onPress != null) {
|
|
legacyCompat_onPress(a0);
|
|
}
|
|
onSelect(value);
|
|
};
|
|
const FormRadio = (require(7989) /* metro dependency 7989: FormRadioNative */).FormRadio;
|
|
tableRowProps['trailing'] = <FormRadio selected={r7} />;
|
|
return <TableRow {...tableRowProps} />;
|
|
}
|
|
|