/* Metro module 14458; source: modules/freeze/native/NativeFreezeScreens.tsx; dependencies: [57, 31, 27, 33, 44, 4510, 4501, 2] */ function _fun109418(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14655:6, offset: 0x0234a78a, size: 227 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(57) /* metro dependency 57 */; const env0_4 = importAll(31) /* metro dependency 31 */; const env0_5 = (require(27) /* metro dependency 27 */).StyleSheet; const env0_6 = (require(33) /* metro dependency 33 */).jsx; const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({screens: {'flex': 1, 'overflow': 'hidden'}}); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/freeze/native/NativeFreezeScreens.tsx'); exports.NativeFreezeScreens = NativeFreezeScreens; } function NativeFreezeScreens({children, activeIndex, detachInactiveScreens, lazy, unmountOnBlur, freezeOnBlur, preloadIndices = []}) { // fn#109419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14655:317, offset: 0x0234a86d, size: 416 bytes, params: 2, frame: 22 var items; var value7; detachInactiveScreens = detachInactiveScreens === undefined || detachInactiveScreens; if (lazy !== undefined) { } unmountOnBlur = !(unmountOnBlur === undefined) && unmountOnBlur; const env0_3 = unmountOnBlur; freezeOnBlur = freezeOnBlur === undefined || freezeOnBlur; const env0_4 = freezeOnBlur; const styles = useStyles(); (importDefault(44) /* metro dependency 44 */)(activeIndex >= 0 && activeIndex < (global.Array.isArray(children) ? children.length : 1), 'NativeFreezeScreens: invalid activeIndex'); const binding = env0_4; const useState = binding.useState; const value6 = env0_3(Reflect.apply(useState, binding, [[activeIndex]]), 2); const property = value6[0]; if (!property.includes(activeIndex)) { items = []; value7 = arraySpread(items, property, 0, 0); items[value7] = activeIndex; value7 + 1; value6[1](items); } const ScreenContainer = (require(4510) /* metro dependency 4510 */).ScreenContainer; const Array = global.Array; return ( {(Array.isArray(children) ? children : [children]).map(_fun109420)} ); } function _fun109420(a0, a1) { // fn#109420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14655:798, offset: 0x0234aa0d, size: 203 bytes, params: 3, frame: 22 var r6; var binding; var includes; var value3; var value5; const Screen = (require(4510) /* metro dependency 4510 */).Screen; const value2 = activeIndex === a1; if (unmountOnBlur) { if (value2) { if (lazy) { binding = env0_6; includes = binding.includes; if (Reflect.apply(includes, binding, [a1])) { value3 = 0; r6 = value2 ? 2 : value3; value5 = environment.__proto__; return ( {a0} ); } if (value2) { value3 = 0; r6 = value2 ? 2 : value3; value5 = environment.__proto__; return ( {a0} ); } binding = env0_5; includes = binding.includes; if (Reflect.apply(includes, binding, [a1])) { value3 = 0; r6 = value2 ? 2 : value3; value5 = environment.__proto__; return ( {a0} ); } return null; } value3 = 0; r6 = value2 ? 2 : value3; value5 = environment.__proto__; return ( {a0} ); } return null; } if (lazy) { binding = env0_6; includes = binding.includes; if (Reflect.apply(includes, binding, [a1])) { value3 = 0; r6 = value2 ? 2 : value3; value5 = environment.__proto__; return ( {a0} ); } if (value2) { value3 = 0; r6 = value2 ? 2 : value3; value5 = environment.__proto__; return ( {a0} ); } binding = env0_5; includes = binding.includes; if (Reflect.apply(includes, binding, [a1])) { value3 = 0; r6 = value2 ? 2 : value3; value5 = environment.__proto__; return ( {a0} ); } return null; } value3 = 0; return ( {a0} ); }