// Module ID: 4925 // Function ID: 4926 // Name: ModalActionCreators // Dependencies: [1074, 4926, 4579, 4927, 4587, 573, 4580, 4928, 2] // Module 4925 (ModalActionCreators) import DispatcherDefault from "Dispatcher" /* 573 */; import Constants from "Constants" /* 1074 */; import NavigationRouteUtils from "NavigationRouteUtils" /* 4579 */; import Types from "Types" /* 4587 */; import uniqueIdDefault from "uniqueId" /* 4926 */; import getDeprecatedModalDataDefault from "getDeprecatedModalData" /* 4927 */; import size from "module_2" /* 2 */; const require = globalThis.__r; const AppContext = Constants.AppContext; const result = size.fileFinishedImporting("actions/ModalActionCreators.tsx"); export default { push(modal, props) { let tmp = arg2; if (arg2 === undefined) { tmp = uniqueIdDefault("modal"); } let APP = arg4; if (arg4 === undefined) { APP = AppContext.APP; } const obj = NavigationRouteUtils; const merged = Object.assign(arg3); obj.pushModal({ modal: getDeprecatedModalDataDefault(modal, {}, props, tmp), trigger: Types.ModalOpenTrigger.AUTOMATIC }); const obj2 = { modal: getDeprecatedModalDataDefault(modal, {}, props, tmp), trigger: Types.ModalOpenTrigger.AUTOMATIC }; const element = { type: "MODAL_PUSH", modal, props, key: tmp, appContext: APP }; DispatcherDefault.dispatch(element); return tmp; }, pushLazy(promise, merged, c3, navigationParams) { const self = this; importDefault = promise; dependencyMap = merged; let tmp = c3; if (c3 === undefined) { tmp = uniqueIdDefault("modal"); } closure_3 = tmp; _require = navigationParams; const rootNavigationRef = require("RootNavigationRef").getRootNavigationRef(); if (null != rootNavigationRef) { if (rootNavigationRef.isReady()) { if (promise instanceof Promise) { let nextPromise = promise.then((result) => result.default); } else { nextPromise = promise(); } nextPromise.then((result) => self.push(result, closure_2, closure_3, closure_0)); } } const obj = require("RootNavigationRef"); return new Promise((arg0) => { closure_0 = arg0; return promise(merged[7]).enqueue(() => closure_0(self.pushLazy(closure_1, closure_2, closure_3, closure_0))); }); }, updateAnimation(key, SLIDE_IN_OUT) { const element = { type: "MODAL_UPDATE", key, props: {}, partial: true, animation: SLIDE_IN_OUT }; DispatcherDefault.dispatch(element); }, pop() { NavigationRouteUtils.popModal(); DispatcherDefault.dispatch({ type: "MODAL_POP" }); }, popWithKey(c3, onExited) { NavigationRouteUtils.popModal(c3, onExited); DispatcherDefault.dispatch({ type: "MODAL_POP", key: c3, onExited }); }, popAboveKey(voiceChannelKey) { return NavigationRouteUtils.popModalsAboveKey(voiceChannelKey); }, popAll() { NavigationRouteUtils.popAllModals(); DispatcherDefault.dispatch({ type: "MODAL_POP_ALL" }); DispatcherDefault.dispatch({ type: "EMAIL_VERIFICATION_MODAL_CLOSE" }); DispatcherDefault.dispatch({ type: "GUILD_SETTINGS_CLOSE" }); DispatcherDefault.dispatch({ type: "HIDE_ACTION_SHEET" }); DispatcherDefault.dispatch({ type: "DISPLAYED_INVITE_CLEAR" }); DispatcherDefault.dispatch({ type: "NOTIFICATION_SETTINGS_MODAL_CLOSE" }); DispatcherDefault.dispatch({ type: "QUICKSWITCHER_HIDE" }); DispatcherDefault.dispatch({ type: "USER_SETTINGS_MODAL_CLOSE" }); DispatcherDefault.dispatch({ type: "CONNECTIONS_GRID_MODAL_HIDE" }); DispatcherDefault.dispatch({ type: "USER_PROFILE_MODAL_CLOSE" }); } };