130 lines
7.8 KiB
TypeScript
130 lines
7.8 KiB
TypeScript
/* Metro module 15146; source: modules/app_launcher/native/AppLauncherActionSheet.tsx; dependencies: [57, 31, 1483, 33, 4017, 8774, 8048, 8775, 6275, 11622, 11732, 6513, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import AppLauncherNavigator from './AppLauncherNavigator.tsx'; /* Metro dependency 11622 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as AppLauncherNativeConstantsModule from './AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
|
|
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as AppLauncherTypesModule from '../AppLauncherTypes.tsx'; /* Metro dependency 8048 */
|
|
import * as AppLauncherContextModule from './AppLauncherContext.tsx'; /* Metro dependency 8774 */
|
|
import * as UseDefaultAppLauncherWidthModule from './hooks/useDefaultAppLauncherWidth.tsx'; /* Metro dependency 8775 */
|
|
import * as GetAppDMApplicationModule from '../../app_dms/getAppDMApplication.tsx'; /* Metro dependency 11732 */
|
|
|
|
function _fun115506(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15343:6, offset: 0x02463094, size: 191 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/AppLauncherActionSheet.tsx');
|
|
exports.useAppLauncherActionSheet = useAppLauncherActionSheet;
|
|
function AppLauncherActionSheet({chatInputRef, channel}) { // fn#115507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15343:161, offset: 0x02463153, size: 476 bytes, params: 2, frame: 29
|
|
let binding = ReactModule;
|
|
let useRef = binding.useRef;
|
|
const value2 = Reflect.apply(useRef, binding, [null]);
|
|
const value4 = (ReanimatedRexportModule).useSharedValue(-1);
|
|
const value5 = (ReanimatedRexportModule).useSharedValue(0);
|
|
const value6 = ReactModule.useRef(undefined);
|
|
binding = ReactModule;
|
|
useRef = binding.useRef;
|
|
const AppLauncherKeyboardCloseReason = (AppLauncherContextModule).AppLauncherKeyboardCloseReason;
|
|
const DISMISSED = AppLauncherKeyboardCloseReason.DISMISSED;
|
|
const value7 = Reflect.apply(useRef, binding, [DISMISSED]);
|
|
const AppLauncherEntrypoint = (AppLauncherTypesModule).AppLauncherEntrypoint;
|
|
const TEXT = AppLauncherEntrypoint.TEXT;
|
|
const value8 = (UseDefaultAppLauncherWidthModule).useDefaultAppLauncherWidth(TEXT);
|
|
const value9 = ReactModule.useMemo(function() {
|
|
return {channel: channel, type: 'channel'};
|
|
}, [channel]);
|
|
const value10 = ReactModule.useRef({getApplicationCommandManager: getApplicationCommandManager_115509,
|
|
closeCustomKeyboard: closeCustomKeyboard_115510, openCustomKeyboard: openCustomKeyboard_115511});
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const object2 = {};
|
|
const HOME = AppLauncherRouteName.HOME;
|
|
object2.initialRouteName = HOME;
|
|
let value = GetAppDMApplicationModule;
|
|
value = value.getAppDMApplication(channel);
|
|
object2.initialSearchQuery = value?.name;
|
|
return (
|
|
<BottomSheet
|
|
ref={value2}
|
|
animatedIndex={value4}
|
|
scrollable
|
|
startExpanded
|
|
>
|
|
<AppLauncherNavigator
|
|
bottomSheetIndex={value4}
|
|
bottomSheetPosition={value5}
|
|
bottomSheetExpandReasonRef={value6}
|
|
context={value9}
|
|
chatInputRef={value10}
|
|
entrypoint={TEXT}
|
|
keyboardCloseReasonRef={value7}
|
|
width={value8}
|
|
overrideParams={object2}
|
|
/>
|
|
</BottomSheet>
|
|
);
|
|
function AppLauncherActionSheetGetApplicationCommandManager() { // fn#115509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15343:551, owner: AppLauncherActionSheet.getApplicationCommandManager, offset: 0x02463346, size: 35 bytes, params: 1, frame: 10
|
|
return chatInputRef.current?.getApplicationCommandManager();
|
|
}
|
|
|
|
function AppLauncherActionSheetCloseCustomKeyboard() { // fn#115510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15343:650, owner: AppLauncherActionSheet.closeCustomKeyboard, offset: 0x01e43b04, size: 32 bytes, params: 1, frame: 9
|
|
const current = env0_2.current;
|
|
if (current != null) {
|
|
current.closeActionSheet();
|
|
}
|
|
}
|
|
|
|
function AppLauncherActionSheetOpenCustomKeyboard() { // fn#115511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15343:723, owner: AppLauncherActionSheet.openCustomKeyboard, offset: 0x02463369, size: 32 bytes, params: 1, frame: 9
|
|
const current = env0_2.current;
|
|
if (current != null) {
|
|
current.expandActionSheet();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function useAppLauncherActionSheet(a0) { // fn#115512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15343:1261, offset: 0x02463389, size: 114 bytes, params: 2, frame: 17
|
|
const env0_0 = a0;
|
|
let binding = ReactModule;
|
|
const [property, property2] = Module00057(binding.useState(false), 2);
|
|
binding = ReactModule;
|
|
const useMemo = binding.useMemo;
|
|
return {appLauncherActionSheet: Reflect.apply(useMemo, binding, [_fun115513, [property, a0]]),
|
|
setAppLauncherActionSheetEnabled: property2};
|
|
function _fun115513() { // fn#115513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15343:1384, offset: 0x024633fb, size: 144 bytes, params: 1, frame: 19
|
|
if (env0_1) {
|
|
const Provider = (importDefault(6513) /* metro dependency 6513: ActionSheetContext */).Provider;
|
|
return (
|
|
<Provider
|
|
value={{
|
|
transitionState: 'visible',
|
|
close: function() {
|
|
},
|
|
onLeave: onLeave_115515,
|
|
registerDismissHandler: registerDismissHandler,
|
|
}}
|
|
>
|
|
<AppLauncherActionSheet {...env0_0} />
|
|
</Provider>
|
|
);
|
|
} else {
|
|
return null;
|
|
}
|
|
function onLeave_115515() { // fn#115515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15343:1465, offset: 0x010d036b, size: 18 bytes, params: 1, frame: 11
|
|
env1_2(false);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function registerDismissHandler() { // fn#115516, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
|
|
}
|
|
|
|
global.__d(_fun115506, 15146, [57, 31, 1483, 33, 4017, 8774, 8048, 8775, 6275, 11622, 11732, 6513,
|
|
2]) /* metro module 15146, dependencies: [57, 31, 1483, 33, 4017, 8774, 8048, 8775, 6275, 11622, 11732, 6513, 2] */;
|