/* Metro module 7988; source: design/components/TableRow/native/TableRadioGroup.native.tsx; dependencies: [57, 31, 661, 33, 6748, 6231, 7987, 2] */ import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */ import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */ import * as TableRowGroupNativeModule from './TableRowGroup.native.tsx'; /* Metro dependency 6231 */ import * as RedesignCompatNativeModule from '../../RedesignCompat/native/RedesignCompat.native.tsx'; /* Metro dependency 6748 */ function _fun63530(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8166:6, offset: 0x01b8430a, size: 205 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const NOOP = (ConstantsModule).NOOP; value = value.createContext({selectedValue: null, onSelect: NOOP}); (FileImportTrackerModule).fileFinishedImporting('design/components/TableRow/native/TableRadioGroup.native.tsx'); exports.TableRadioGroupContext = value; exports.TableRadioGroup = TableRadioGroup; function TableRadioGroup({children, value, defaultValue, onChange, title, description, helperText, hasIcons, groupRef, accessibilityLabel}) { // fn#63531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8166:335, offset: 0x01b843d7, size: 436 bytes, params: 2, frame: 30 let env0_2 = undefined; const value2 = value !== undefined; let binding = undefined; const useState = binding.useState; const value6 = env0_2(Reflect.apply(useState, binding, [value2 ? null : defaultValue ?? null]), 2); const property = value6[0]; env0_2 = value6[1]; const r15 = (value2 ? value : property) ?? null; binding = r15; binding.useImperativeHandle(groupRef, function() { return {setValue: _fun63533, getValue: _fun63534}; }, [value2, onChange, r15]); const useContext = binding.useContext; const RedesignCompatContext = (RedesignCompatNativeModule).RedesignCompatContext; const env0_4 = Reflect.apply(useContext, binding, [RedesignCompatContext]); const env0_5 = binding.useCallback(_fun63535, [value2, onChange]); value = binding.useMemo(_fun63536, [r15, value]); const Provider = env0_5.Provider; const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup; const Children = binding.Children; return ( {Children.map(children, _fun63537)} ); function _fun63532() { // fn#63532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8166:614, offset: 0x01b8458b, size: 26 bytes, params: 1, frame: 3 return {setValue: setValue, getValue: getValue_63534}; function setValue(a0) { // fn#63533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8166:629, offset: 0x01b845a5, size: 49 bytes, params: 2, frame: 12 if (!result) { env1_2(a0); } if (onChange != null) { onChange(a0); } } function getValue_63534() { // fn#63534, offset: 0x011057d9, size: 9 bytes, params: 1, frame: 1 return env1_3; } } function _fun63535(a0) { // fn#63535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8166:750, offset: 0x01b845d6, size: 49 bytes, params: 2, frame: 12 if (!result) { env0_2(a0); } if (onChange != null) { onChange(a0); } } function _fun63536() { // fn#63536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8166:798, offset: 0x01b84607, size: 25 bytes, params: 1, frame: 3 return {selectedValue: env0_3, onSelect: env0_5}; } function _fun63537(a0) { // fn#63537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8166:1029, offset: 0x01b84620, size: 78 bytes, params: 2, frame: 13 const value = a0; const binding = env1_3; return binding.isValidElement(value) && value.type === (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow || env0_4 ? value : null; } } } global.__d(_fun63530, 7988, [57, 31, 661, 33, 6748, 6231, 7987, 2]) /* metro module 7988, dependencies: [57, 31, 661, 33, 6748, 6231, 7987, 2] */;