// Module ID: 16871 // Function ID: 16872 // Name: AppLauncherActionSheet // Dependencies: [32, 19, 1482, 21, 4373, 11348, 9539, 11349, 7253, 12211, 12325, 7255, 2] // Exports: useAppLauncherActionSheet // Module 16871 (AppLauncherActionSheet) import ReanimatedRexport from "ReanimatedRexport" /* 4373 */; import Sheet_BottomSheet from "Sheet/BottomSheet" /* 7253 */; import ActionSheetContextDefault from "ActionSheetContext" /* 7255 */; import AppLauncherTypes from "AppLauncherTypes" /* 9539 */; import AppLauncherContext from "AppLauncherContext" /* 11348 */; import useDefaultAppLauncherWidth from "useDefaultAppLauncherWidth" /* 11349 */; import AppLauncherNavigatorDefault from "AppLauncherNavigator" /* 12211 */; import getAppDMApplication from "getAppDMApplication" /* 12325 */; import _slicedToArray from "module_32" /* 32 */; import noop from "module_19" /* 19 */; require = fn; function AppLauncherActionSheet(arg0) { ({ chatInputRef: require, channel } = arg0); const ref = noop.useRef(null); const sharedValue = ReanimatedRexport.useSharedValue(-1); const sharedValue1 = ReanimatedRexport.useSharedValue(0); const ref1 = noop.useRef(undefined); const TEXT = AppLauncherTypes.AppLauncherEntrypoint.TEXT; const ref2 = noop.useRef(AppLauncherContext.AppLauncherKeyboardCloseReason.DISMISSED); const items = [channel]; const defaultAppLauncherWidth = useDefaultAppLauncherWidth.useDefaultAppLauncherWidth(TEXT); const memo = noop.useMemo(() => ({ channel, type: "channel" }), items); const obj4 = { getApplicationCommandManager() { const current = ref.current; let applicationCommandManager; if (current != null) { applicationCommandManager = current.getApplicationCommandManager(); } return applicationCommandManager; }, closeCustomKeyboard() { const current = ref.current; if (current != null) { current.closeActionSheet(); } }, openCustomKeyboard() { const current = ref.current; if (current != null) { current.expandActionSheet(); } } }; const obj5 = { ref, animatedIndex: sharedValue, scrollable: true, startExpanded: true, children: null }; const obj6 = { bottomSheetIndex: sharedValue, bottomSheetPosition: sharedValue1, bottomSheetExpandReasonRef: ref1, context: memo, chatInputRef: noop.useRef({ getApplicationCommandManager() { const current = ref.current; let applicationCommandManager; if (current != null) { applicationCommandManager = current.getApplicationCommandManager(); } return applicationCommandManager; }, closeCustomKeyboard() { const current = ref.current; if (current != null) { current.closeActionSheet(); } }, openCustomKeyboard() { const current = ref.current; if (current != null) { current.expandActionSheet(); } } }), entrypoint: TEXT, keyboardCloseReasonRef: ref2, width: defaultAppLauncherWidth, overrideParams: null }; const obj7 = { initialRouteName: AppLauncherRouteName.HOME, initialSearchQuery: null }; const ref3 = noop.useRef({ getApplicationCommandManager() { const current = ref.current; let applicationCommandManager; if (current != null) { applicationCommandManager = current.getApplicationCommandManager(); } return applicationCommandManager; }, closeCustomKeyboard() { const current = ref.current; if (current != null) { current.closeActionSheet(); } }, openCustomKeyboard() { const current = ref.current; if (current != null) { current.expandActionSheet(); } } }); const appDMApplication = getAppDMApplication.getAppDMApplication(channel); let name; if (appDMApplication != null) { name = appDMApplication.name; } obj7.initialSearchQuery = name; obj6.overrideParams = obj7; obj5.children = ; return jsx(Sheet_BottomSheet.BottomSheet, { ref, animatedIndex: sharedValue, scrollable: true, startExpanded: true, children: null }); } const AppLauncherRouteName = fn(1482).AppLauncherRouteName; const jsx = fn(21).jsx; const size = fn(2); const result = size.fileFinishedImporting("modules/app_launcher/native/AppLauncherActionSheet.tsx"); export const useAppLauncherActionSheet = function useAppLauncherActionSheet(arg0) { closure_0 = arg0; let tmp = _slicedToArray(noop.useState(false), 2); const first = tmp[0]; closure_2 = tmp3; let obj = { appLauncherActionSheet: null, setAppLauncherActionSheetEnabled: tmp[1] }; const items = [first, arg0]; obj.appLauncherActionSheet = noop.useMemo(() => { let tmp = null; if (first) { const obj = { value: null, children: null }; const obj2 = { transitionState: "visible", close() { }, onLeave() { closure_1_2(false); }, registerDismissHandler() { } }; obj.value = obj2; const obj3 = {}; const merged = Object.assign(closure_0); obj.children = ; tmp = jsx(ActionSheetContextDefault.Provider, { value: null, children: null }); } return tmp; }, items); return obj; };