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

105 lines
3.5 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 15494
// Function ID: 119131
2026-07-20 16:05:17 +00:00
// Name: AppLauncherActionSheet
2026-07-24 07:16:23 +00:00
// Dependencies: [57, 31, 1455, 33, 3991, 10911, 8226, 10912, 5187, 11231, 11345, 5444, 2]
2026-07-20 16:05:17 +00:00
// Exports: useAppLauncherActionSheet
2026-07-24 07:16:23 +00:00
// Module 15494 (AppLauncherActionSheet)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import result from "result";
import { AppLauncherRouteName } from "APP_LAUNCHER_BUILT_IN_SECTION_ICON";
import { jsx } from "jsxProd";
const require = arg1;
2026-07-20 16:05:17 +00:00
function AppLauncherActionSheet(arg0) {
let channel;
2026-07-23 10:11:24 +00:00
let require;
({ chatInputRef: require, channel } = arg0);
2026-07-20 16:05:17 +00:00
const ref = React.useRef(null);
2026-07-23 10:11:24 +00:00
let obj = require(ref[4]);
2026-07-20 16:05:17 +00:00
const sharedValue = obj.useSharedValue(-1);
2026-07-23 10:11:24 +00:00
let obj1 = require(ref[4]);
2026-07-20 16:05:17 +00:00
const sharedValue1 = obj1.useSharedValue(0);
const ref1 = React.useRef(undefined);
2026-07-23 10:11:24 +00:00
const TEXT = require(ref[6]).AppLauncherEntrypoint.TEXT;
let obj2 = require(ref[7]);
2026-07-20 16:05:17 +00:00
const items = [channel];
const defaultAppLauncherWidth = obj2.useDefaultAppLauncherWidth(TEXT);
obj = {
getApplicationCommandManager() {
const current = ref.current;
let applicationCommandManager;
if (null != current) {
applicationCommandManager = current.getApplicationCommandManager();
}
return applicationCommandManager;
},
closeCustomKeyboard() {
const current = ref.current;
if (null != current) {
current.closeActionSheet();
}
},
openCustomKeyboard() {
const current = ref.current;
if (null != current) {
current.expandActionSheet();
}
}
};
const memo = React.useMemo(() => ({ channel, type: "channel" }), items);
2026-07-23 10:11:24 +00:00
const ref2 = React.useRef(require(ref[5]).AppLauncherKeyboardCloseReason.DISMISSED);
2026-07-20 16:05:17 +00:00
obj = { ref, animatedIndex: sharedValue, scrollable: true, startExpanded: true };
obj1 = { bottomSheetIndex: sharedValue, bottomSheetPosition: sharedValue1, bottomSheetExpandReasonRef: ref1, context: memo, chatInputRef: React.useRef(obj), entrypoint: TEXT, keyboardCloseReasonRef: ref2, width: defaultAppLauncherWidth };
obj2 = { initialRouteName: AppLauncherRouteName.HOME };
const ref3 = React.useRef(obj);
const tmp10 = jsx;
const tmp9 = jsx;
2026-07-23 10:11:24 +00:00
const tmp11 = channel(ref[9]);
const appDMApplication = require(ref[10]).getAppDMApplication(channel);
2026-07-20 16:05:17 +00:00
let name;
if (null != appDMApplication) {
name = appDMApplication.name;
}
obj2.initialSearchQuery = name;
obj1.overrideParams = obj2;
obj.children = tmp10(tmp11, obj1);
2026-07-23 10:11:24 +00:00
return tmp9(require(ref[8]).BottomSheet, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const result = require("APP_LAUNCHER_BUILT_IN_SECTION_ICON").fileFinishedImporting("modules/app_launcher/native/AppLauncherActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export const useAppLauncherActionSheet = function useAppLauncherActionSheet(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let tmp = callback(React.useState(false), 2);
2026-07-20 16:05:17 +00:00
const first = tmp[0];
const dependencyMap = tmp3;
const items = [first, arg0];
return {
appLauncherActionSheet: React.useMemo(() => {
let tmp = null;
if (first) {
let obj = {};
obj = {
transitionState: "visible",
close() {
},
onLeave() {
2026-07-23 10:11:24 +00:00
outer1_2(false);
2026-07-20 16:05:17 +00:00
},
registerDismissHandler(onDismiss) {
}
};
obj.value = obj;
obj = {};
2026-07-23 10:11:24 +00:00
const merged = Object.assign(closure_0);
obj.children = outer1_6(outer1_7, obj);
tmp = outer1_6(first(tmp3[11]).Provider, obj);
2026-07-20 16:05:17 +00:00
}
return tmp;
}, items),
setAppLauncherActionSheetEnabled: tmp[1]
};
};