/* Metro module 4533; source: unknown; dependencies: [29, 31, 33, 4519, 4534, 4513, 4520, 4535, 4523] */
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import React from './module-00031-React.js'; /* Metro dependency 31 */
import Module04520 from './module-04520.jsx'; /* Metro dependency 4520 */
import __INTERNAL_VIEW_CONFIG from './module-04535-__INTERNAL_VIEW_CONFIG.js'; /* Metro dependency 4535 */
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module04534Module from './module-04534.jsx'; /* Metro dependency 4534 */
function _fun38680(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4711:6, offset: 0x010c6ed4, size: 146 bytes, params: 8, frame: 19
const env0_1 = require;
const env0_4 = ['goBackGesture', 'screensRefs', 'currentScreenId', 'transitionAnimation', 'screenEdgeGesture',
'onFinishTransitioning', 'children'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.default = ScreenStack;
function ScreenStack(a0) { // fn#38681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4711:269, offset: 0x010c6f66, size: 533 bytes, params: 2, frame: 32
const goBackGesture = a0.goBackGesture;
const screensRefs = a0.screensRefs;
const currentScreenId = a0.currentScreenId;
const transitionAnimation = a0.transitionAnimation;
const screenEdgeGesture = a0.screenEdgeGesture;
const onFinishTransitioning = a0.onFinishTransitioning;
const children = a0.children;
let binding = ObjectWithoutProperties;
const value2 = undefined;
const value3 = binding(a0, env0_4);
const value4 = React.useRef((screensRefs == null ? value2 : screensRefs.current) ?? ({}));
binding = React;
const value5 = binding.useRef(null);
let Children = binding.Children;
const env0_1 = Children.count(children);
const useContext = binding.useContext;
const GHContext = (Module04534Module).GHContext;
const value6 = Reflect.apply(useContext, binding, [GHContext]);
const value7 = binding.useRef({stackUseEffectCallback: function(a0) {
}});
Children = binding.Children;
const value8 = Children.map(children, _fun38683);
binding.useEffect(_fun38684);
(importDefault(4519) /* metro dependency 4519 */)(value6.name !== 'GHWrapper' && value2 !== goBackGesture,
'Cannot detect GestureDetectorProvider in a screen that uses `goBackGesture`. Make sure your navigator is wrapped in GestureDetectorProvider.');
(importDefault(4519) /* metro dependency 4519 */)(value2 !== goBackGesture && value4 === null && value2 === currentScreenId,
'Custom Screen Transition require screensRefs and currentScreenId to be provided.');
const RNSScreensRefContext = (Module04534Module).RNSScreensRefContext;
const Provider = RNSScreensRefContext.Provider;
const r10 = screenEdgeGesture != null && screenEdgeGesture;
const Object = global.Object;
const assign = Object.assign;
const object2 = {};
object2.iosPreventReattachmentOfDismissedScreens = (importDefault(4523) /* metro dependency 4523 */).experiment.iosPreventReattachmentOfDismissedScreens;
object2.onFinishTransitioning = onFinishTransitioning;
object2.ref = value5;
object2.children = value8;
return (
{((Component) => {((Component) => )(__INTERNAL_VIEW_CONFIG)})(value6)}
);
function _fun38683(a0, a1) { // fn#38683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4711:666, offset: 0x010c717b, size: 230 bytes, params: 3, frame: 17
const props = a0.props;
const key = a0.key;
const value = undefined;
const r1 = (props == null ? value : props.descriptor) ?? (props == null || props.descriptors == null ? value : props.descriptors[key]);
let r5 = (r1 == null || r1.options == null ? value : r1.options.freezeOnBlur) ?? (require(4513) /* metro dependency 4513 */).freezeEnabled();
const value5 = 'nativeFabricUIManager' in env1_0;
const value7 = env0_1 - a1;
const r6 = value5 ? value7 > 2 : value7 > 1;
const defaultImport = Module04520;
r5 = r5 && r6;
return ((Component) => {a0})(defaultImport);
}
function _fun38684() { // fn#38684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4711:1023, offset: 0x010c7261, size: 31 bytes, params: 1, frame: 11
env0_2.current.stackUseEffectCallback(env0_0);
}
}
}
global.__d(_fun38680, 4533, [29, 31, 33, 4519, 4534, 4513, 4520, 4535,
4523]) /* metro module 4533, dependencies: [29, 31, 33, 4519, 4534, 4513, 4520, 4535, 4523] */;