/* Metro module 15317; source: modules/launchpad/native/LaunchPadWrapper.tsx; dependencies: [57, 31, 27, 11324, 661, 33, 4501, 697, 12080, 1239, 15318, 8621, 683, 15315, 4081, 4571, 6619, 4017, 15320, 4556, 1244, 4521, 15322, 2] */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import UseBackPressHandler from '../../routing/native/useBackPressHandler.tsx'; /* Metro dependency 4571 */ import UseRefValue from '../../../hooks/useRefValue.tsx'; /* Metro dependency 6619 */ import UseStateFromSharedValue from '../../reanimated/native/useStateFromSharedValue.tsx'; /* Metro dependency 8621 */ import RouteManager from '../../routing/RouteManager.tsx'; /* Metro dependency 12080 */ import UseLaunchPadAnimatedStylesNative from './useLaunchPadAnimatedStyles.native.tsx'; /* Metro dependency 15318 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as ComponentDispatchUtilsModule from '../../../utils/ComponentDispatchUtils.tsx'; /* Metro dependency 1239 */ import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as FreezeModule from '../../../by-id/module-04521-Freeze.jsx'; /* Metro dependency 4521 */ import * as AccessibilityViewNativeModule from '../../../design/components/AccessibilityView/AccessibilityView.native.tsx'; /* Metro dependency 4556 */ import * as LaunchPadConstantsModule from './LaunchPadConstants.tsx'; /* Metro dependency 11324 */ import * as LaunchPadPullTabCacheModule from './LaunchPadPullTabCache.tsx'; /* Metro dependency 15315 */ function _fun117091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:6, offset: 0x024a39a4, size: 388 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const env0_5 = value.View; const env0_6 = value.Pressable; const env0_7 = value.TouchableOpacity; const env0_8 = value.StyleSheet; value = require(661) /* metro dependency 661: Constants */; const env0_10 = value.AnalyticEvents; const env0_11 = value.ComponentActions; value = require(33) /* metro dependency 33 */; const env0_12 = value.jsx; const env0_13 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object.modalWrapper = {'height': '100%', 'width': '100%', paddingTop: PX_8}; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object.a11yDismiss = {'position': 'absolute', 'top': 0, 'width': '100%', height: PX_8}; const env0_14 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/launchpad/native/LaunchPadWrapper.tsx'); exports.default = LaunchPadWrapper; function LaunchPadWrapper({launchPadType, gestureState, launchPadShown, launchPadSharedState, launchPadPullTabState, updaters}) { // fn#117092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:554, offset: 0x024a3b28, size: 946 bytes, params: 2, frame: 34 const styles = useStyles(); const {launchPadCoverStyles, launchPadStyles} = (UseLaunchPadAnimatedStylesNative)({launchPadSharedState: launchPadSharedState, launchPadShown: launchPadShown, gestureState: gestureState}); const value4 = (UseStateFromSharedValue)(launchPadShown); const binding = env0_4; const useRef = binding.useRef; const value5 = !value4; const value6 = Reflect.apply(useRef, binding, [value5]); var env0_4 = value6(binding.useState({}), 2)[1]; binding.useEffect(_fun117093, [value4]); const value9 = binding.useCallback(function() { return updaters.setLaunchPadPosition(0); }, [updaters]); binding.useEffect(_fun117097, [value4]); binding.useEffect(_fun117098, [launchPadType, value4]); binding.useEffect(function() { return _fun117100; }, [launchPadShown]); (UseBackPressHandler)(_fun117101); useLaunchPadComponentDispatchListeners(updaters); const value10 = (UseRefValue)(value6); const absoluteFill = StyleSheet.absoluteFill; const View2 = (ReanimatedRexport).View; const value11 = 'none'; const view = ; const PULL_TAB = LaunchPadTypes.PULL_TAB; const r5 = ( launchPadType !== PULL_TAB ? null : ((Component) => )(importDefault(15320) /* metro dependency 15320: LaunchPadPullTab */) ); const View3 = (ReanimatedRexport).View; const r8 = value4 ? undefined : value11; const AccessibilityView = (AccessibilityViewNativeModule).AccessibilityView; const r13 = value4 ? 'yes' : 'no'; const intl = (IndexNativeModule).intl; const string = intl.string; const WAI6xu = (IndexNativeModule).t.WAI6xu; const items2 = [ , ]; items2[1] = ( ); const Freeze = (FreezeModule).Freeze; items2[2] = ( {((Component) => )(importDefault(15322) /* metro dependency 15322: LaunchPad */)} ); return ( {view} {r5} {items2} ); function _fun117093() { // fn#117093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:884, offset: 0x024a3eda, size: 70 bytes, params: 1, frame: 15 if (env0_2) { Module00057.current = false; return undefined; } const env0_0 = global.setTimeout(_fun117094, 1000); return _fun117095; function _fun117094() { // fn#117094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:914, offset: 0x024a3f20, size: 30 bytes, params: 1, frame: 11 env1_3.current = true; env1_4({}); } function _fun117095() { // fn#117095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:951, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11 return global.clearTimeout(env0_0); } } function _fun117097() { // fn#117097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1061, offset: 0x024a3f54, size: 59 bytes, params: 1, frame: 12 var defaultImport; if (env0_2) { value = environment.__proto__; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.LAUNCHPAD_OPENED); } } function _fun117098() { // fn#117098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1124, offset: 0x024a3f8f, size: 153 bytes, params: 1, frame: 15 var value; const launchPadTypeBinding = launchPadType; const PULL_TAB = LaunchPadTypes.PULL_TAB; if (launchPadTypeBinding !== PULL_TAB) { (require(15315) /* metro dependency 15315: LaunchPadPullTabCache */).clearLaunchPadPullTabExclusionRect(); } else { (require(15315) /* metro dependency 15315: LaunchPadPullTabCache */).setLaunchPadPullTabExclusionRect(); if (env0_2) { value = require(4081) /* metro dependency 4081: HapticUtilsNative */; value.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_LIGHT); } } } function _fun117099() { // fn#117099, offset: 0x024a4028, size: 11 bytes, params: 1, frame: 1 return _fun117100; function _fun117100() { // fn#117100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1339, offset: 0x024a4033, size: 37 bytes, params: 1, frame: 11 const value = environment.__proto__.__proto__; return (LaunchPadPullTabCacheModule).clearLaunchPadPullTabExclusionRect(); } } function _fun117101() { // fn#117101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1405, offset: 0x024a4058, size: 26 bytes, params: 1, frame: 10 if (env0_2) { env0_5(); } return env0_2; } function useLaunchPadComponentDispatchListeners(a0) { // fn#117102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1422, owner: LaunchPadWrapper.useLaunchPadComponentDispatchListeners, offset: 0x024a4072, size: 46 bytes, params: 2, frame: 14 const env0_0 = a0; env1_4.useEffect(_fun117103, [a0]); function _fun117103() { // fn#117103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1486, offset: 0x024a40a0, size: 150 bytes, params: 1, frame: 20 const showLaunchPad_1171042 = showLaunchPad_117104; const hideLaunchPad_1171052 = hideLaunchPad_117105; const env0_2 = (RouteManager).addRouteChangeListener(hideLaunchPad_1171052); const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch; let subscribe = ComponentDispatch.subscribe; const LAUNCH_PAD_SHOW = ComponentActions.LAUNCH_PAD_SHOW; Reflect.apply(subscribe, ComponentDispatch, [LAUNCH_PAD_SHOW, showLaunchPad_1171042]); subscribe = ComponentDispatch.subscribe; const LAUNCH_PAD_HIDE = ComponentActions.LAUNCH_PAD_HIDE; Reflect.apply(subscribe, ComponentDispatch, [LAUNCH_PAD_HIDE, hideLaunchPad_1171052]); return _fun117106; function showLaunchPad_117104() { // fn#117104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1509, offset: 0x024a4136, size: 38 bytes, params: 1, frame: 11 const binding = env1_0; binding.setLaunchPadShown(true); binding.setLaunchPadPosition(1); } function hideLaunchPad_117105() { // fn#117105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1579, offset: 0x024a415c, size: 37 bytes, params: 1, frame: 11 const binding = env1_0; binding.setLaunchPadShown(false); binding.setLaunchPadPosition(0); } function _fun117106() { // fn#117106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1828, offset: 0x024a4181, size: 107 bytes, params: 1, frame: 19 env0_2(); const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch; let unsubscribe = ComponentDispatch.unsubscribe; const LAUNCH_PAD_SHOW = ComponentActions.LAUNCH_PAD_SHOW; Reflect.apply(unsubscribe, ComponentDispatch, [LAUNCH_PAD_SHOW, showLaunchPad_117104]); unsubscribe = ComponentDispatch.unsubscribe; const LAUNCH_PAD_HIDE = ComponentActions.LAUNCH_PAD_HIDE; Reflect.apply(unsubscribe, ComponentDispatch, [LAUNCH_PAD_HIDE, hideLaunchPad_117105]); } } } } } global.__d(_fun117091, 15317, [57, 31, 27, 11324, 661, 33, 4501, 697, 12080, 1239, 15318, 8621, 683, 15315, 4081, 4571, 6619, 4017, 15320, 4556, 1244, 4521, 15322, 2]) /* metro module 15317, dependencies: [57, 31, 27, 11324, 661, 33, 4501, 697, 12080, 1239, 15318, 8621, 683, 15315, 4081, 4571, 6619, 4017, 15320, 4556, 1244, 4521, 15322, 2] */;