// Metro module 15590 (f15591). import { useRef, useMemo, useState } from "react"; import { AppLauncherRouteName } from "./AppLauncherNativeConstants"; import { useSharedValue } from "../../reanimated/ReanimatedRexport"; import { AppLauncherKeyboardCloseReason } from "./AppLauncherContext"; import { AppLauncherEntrypoint } from "../AppLauncherTypes"; import { useDefaultAppLauncherWidth } from "./hooks/useDefaultAppLauncherWidth"; import { BottomSheet } from "../../../design/components/Sheet/native/BottomSheet.native"; import AppLauncherNavigator from "./AppLauncherNavigator"; import { getAppDMApplication } from "../../app_dms/getAppDMApplication"; import ActionSheetContext from "../../action_sheet/native/ActionSheetContext"; const AppLauncherActionSheet = function AppLauncherActionSheet(props) { const { chatInputRef, channel } = props; const ref = useRef(null); const sharedValue2 = useSharedValue(-1); const sharedValue = useSharedValue(0); const ref3 = useRef(void 0); const ref2 = useRef(AppLauncherKeyboardCloseReason.DISMISSED); const TEXT = AppLauncherEntrypoint.TEXT; const defaultAppLauncherWidth = useDefaultAppLauncherWidth(TEXT); return ({ channel, type: "channel" }), [channel])} chatInputRef={useRef({ getApplicationCommandManager: () => { const current = chatInputRef.current; return current == null ? void 0 : current.getApplicationCommandManager(); }, 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={{ initialRouteName: AppLauncherRouteName.HOME, initialSearchQuery: getAppDMApplication(channel)?.name }} /> ; }; export function useAppLauncherActionSheet(a0) { const [state, setState] = useState(false); return { appLauncherActionSheet: useMemo(() => state ? {}, onLeave: () => { setState(false); }, registerDismissHandler: () => {} }}> : null, [state, a0]), setAppLauncherActionSheetEnabled: setState }; }