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

100 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16075
// Function ID: 16076
2026-07-20 16:05:17 +00:00
// Name: AppLauncherActionSheet
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 1499, 21, 4119, 9602, 9603, 9604, 6988, 11308, 11422, 7160, 2]
2026-07-20 16:05:17 +00:00
// Exports: useAppLauncherActionSheet
2026-08-24 06:08:38 +00:00
// Module 16075 (AppLauncherActionSheet)
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import { AppLauncherRouteName } from "APP_LAUNCHER_BUILT_IN_SECTION_ICON" /* 1499 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function AppLauncherActionSheet(arg0) {
2026-07-23 10:11:24 +00:00
({ chatInputRef: require, channel } = arg0);
2026-07-29 08:29:29 +00:00
let ref;
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-08-24 06:08:38 +00:00
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;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
applicationCommandManager = current.getApplicationCommandManager();
}
return applicationCommandManager;
},
closeCustomKeyboard() {
const current = ref.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
current.closeActionSheet();
}
},
openCustomKeyboard() {
const current = ref.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
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-29 08:29:29 +00:00
obj = { ref, animatedIndex: sharedValue, scrollable: true, startExpanded: true, children: null };
obj1 = { bottomSheetIndex: sharedValue, bottomSheetPosition: sharedValue1, bottomSheetExpandReasonRef: ref1, context: memo, chatInputRef: React.useRef(obj), entrypoint: TEXT, keyboardCloseReasonRef: ref2, width: defaultAppLauncherWidth, overrideParams: null };
obj2 = { initialRouteName: AppLauncherRouteName.HOME, initialSearchQuery: null };
2026-07-20 16:05:17 +00:00
const ref3 = React.useRef(obj);
2026-07-29 08:29:29 +00:00
const tmp10 = channel(ref[9]);
2026-07-23 10:11:24 +00:00
const appDMApplication = require(ref[10]).getAppDMApplication(channel);
2026-07-20 16:05:17 +00:00
let name;
2026-07-29 08:29:29 +00:00
if (appDMApplication != null) {
2026-07-20 16:05:17 +00:00
name = appDMApplication.name;
}
2026-07-29 08:29:29 +00:00
obj2[1] = name;
obj1[8] = obj2;
obj[4] = <tmp10 bottomSheetIndex={sharedValue} bottomSheetPosition={sharedValue1} bottomSheetExpandReasonRef={ref1} context={memo} chatInputRef={React.useRef(obj)} entrypoint={TEXT} keyboardCloseReasonRef={ref2} width={defaultAppLauncherWidth} overrideParams={null} />;
return jsx(require(ref[8]).BottomSheet, { ref, animatedIndex: sharedValue, scrollable: true, startExpanded: true, children: null });
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/app_launcher/native/AppLauncherActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export const useAppLauncherActionSheet = function useAppLauncherActionSheet(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-23 10:11:24 +00:00
let tmp = callback(React.useState(false), 2);
2026-07-20 16:05:17 +00:00
const first = tmp[0];
2026-08-24 06:08:38 +00:00
closure_2 = tmp3;
2026-07-20 16:05:17 +00:00
const items = [first, arg0];
return {
appLauncherActionSheet: React.useMemo(() => {
let tmp = null;
if (first) {
2026-07-29 08:29:29 +00:00
let obj = { value: null, children: null };
obj = { transitionState: "visible", close: null, onLeave: null, registerDismissHandler: null };
obj[1] = function close() {
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
};
obj[2] = function onLeave() {
callback(false);
};
obj[3] = function registerDismissHandler(onDismiss) {
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-23 10:11:24 +00:00
const merged = Object.assign(closure_0);
2026-08-24 06:08:38 +00:00
obj[1] = closure_1_6(closure_1_7, obj);
tmp = closure_1_6(first(table[11]).Provider, obj);
2026-07-20 16:05:17 +00:00
}
return tmp;
}, items),
setAppLauncherActionSheetEnabled: tmp[1]
};
};