decord/source/modules/app_launcher/native/AppLauncherContext.tsx

74 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 10911
// Function ID: 84814
2026-07-20 16:05:17 +00:00
// Name: useAppLauncherChatInputRefDummy
2026-07-24 07:16:23 +00:00
// Dependencies: [31, 3991, 8226, 10912, 2]
2026-07-20 16:05:17 +00:00
// Exports: useAppLauncherContext, useRequiredAppLauncherContext
2026-07-24 07:16:23 +00:00
// Module 10911 (useAppLauncherChatInputRefDummy)
2026-07-23 10:11:24 +00:00
import importAllResult from "result";
const require = arg1;
2026-07-20 16:05:17 +00:00
function useAppLauncherChatInputRefDummy(noop) {
2026-07-23 10:11:24 +00:00
noop = noop.noop;
2026-07-20 16:05:17 +00:00
return importAllResult.useRef({
getApplicationCommandManager() {
if (!noop) {
const _Error = Error;
const error = new Error("use useRequiredAppLauncherContext and provide a ChatInputRef");
throw error;
}
},
openCustomKeyboard() {
if (!noop) {
const _Error = Error;
const error = new Error("use useRequiredAppLauncherContext and provide a ChatInputRef");
throw error;
}
},
closeCustomKeyboard() {
if (!noop) {
const _Error = Error;
const error = new Error("use useRequiredAppLauncherContext and provide a ChatInputRef");
throw error;
}
}
});
}
2026-07-23 10:11:24 +00:00
let obj = { DISMISSED: 0, [0]: "DISMISSED", COMMAND: 1, [1]: "COMMAND", ACTIVITY: 2, [2]: "ACTIVITY", BACK: 3, [3]: "BACK", OAUTH_MODAL: 4, [4]: "OAUTH_MODAL" };
let context = importAllResult.createContext(undefined);
const result = require("AppLauncherEntrypoint").fileFinishedImporting("modules/app_launcher/native/AppLauncherContext.tsx");
2026-07-20 16:05:17 +00:00
export const AppLauncherKeyboardCloseReason = obj;
export const AppLauncherBottomSheetExpandReason = { GESTURE: 0, [0]: "GESTURE", KEYBOARD: 1, [1]: "KEYBOARD", APP_VIEW: 2, [2]: "APP_VIEW", COMMAND_VIEW: 3, [3]: "COMMAND_VIEW", OTHER: 4, [4]: "OTHER" };
export const AppLauncherContext = context;
export { useAppLauncherChatInputRefDummy };
export const useRequiredAppLauncherContext = function useRequiredAppLauncherContext() {
2026-07-23 10:11:24 +00:00
context = importAllResult.useContext(context);
2026-07-20 16:05:17 +00:00
if (null == context) {
const _Error = Error;
const error = new Error("AppLauncherContext not found, must be used within AppLauncherNavigator");
throw error;
} else {
return context;
}
};
export const useAppLauncherContext = function useAppLauncherContext() {
2026-07-23 10:11:24 +00:00
const _require = sharedValue.useRef(sharedValue1.DISMISSED);
const dependencyMap = sharedValue.useRef(undefined);
sharedValue = _require(3991).useSharedValue(-1);
const obj = _require(3991);
sharedValue1 = _require(3991).useSharedValue(0);
2026-07-24 07:16:23 +00:00
const TEXT = _require(8226).AppLauncherEntrypoint.TEXT;
2026-07-23 10:11:24 +00:00
const obj2 = _require(3991);
2026-07-24 07:16:23 +00:00
const defaultAppLauncherWidth = _require(10912).useDefaultAppLauncherWidth(TEXT);
2026-07-23 10:11:24 +00:00
const tmp4 = defaultAppLauncherWidth({ noop: false });
let closure_6 = tmp4;
2026-07-20 16:05:17 +00:00
const items = [defaultAppLauncherWidth, TEXT, tmp4, sharedValue, sharedValue1];
2026-07-23 10:11:24 +00:00
let memo = sharedValue.useMemo(() => ({ keyboardCloseReasonRef: closure_0, bottomSheetIndex: sharedValue, bottomSheetPosition: sharedValue1, bottomSheetExpandReasonRef: closure_1, chatInputRef: closure_6, width: defaultAppLauncherWidth, entrypoint: TEXT, onActivityItemSelected: undefined }), items);
const context = sharedValue.useContext(TEXT);
2026-07-20 16:05:17 +00:00
if (null != context) {
memo = context;
}
return memo;
};