104 lines
6.0 KiB
TypeScript
104 lines
6.0 KiB
TypeScript
/* Metro module 8774; source: modules/app_launcher/native/AppLauncherContext.tsx; dependencies: [31, 4017, 8048, 8775, 2] */
|
|
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 ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as AppLauncherTypesModule from '../AppLauncherTypes.tsx'; /* Metro dependency 8048 */
|
|
|
|
function _fun68618(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8959:6, offset: 0x01c56405, size: 334 bytes, params: 8, frame: 25
|
|
const env0_0 = require;
|
|
const useAppLauncherChatInputRefDummy2 = useAppLauncherChatInputRefDummy;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
object = {DISMISSED: 0};
|
|
object[0] = 'DISMISSED';
|
|
object.COMMAND = 1;
|
|
object[1] = 'COMMAND';
|
|
object.ACTIVITY = 2;
|
|
object[2] = 'ACTIVITY';
|
|
object.BACK = 3;
|
|
object[3] = 'BACK';
|
|
object.OAUTH_MODAL = 4;
|
|
object[4] = 'OAUTH_MODAL';
|
|
const object2 = {GESTURE: 0};
|
|
object2[0] = 'GESTURE';
|
|
object2.KEYBOARD = 1;
|
|
object2[1] = 'KEYBOARD';
|
|
object2.APP_VIEW = 2;
|
|
object2[2] = 'APP_VIEW';
|
|
object2.COMMAND_VIEW = 3;
|
|
object2[3] = 'COMMAND_VIEW';
|
|
object2.OTHER = 4;
|
|
object2[4] = 'OTHER';
|
|
value = value.createContext(undefined);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/AppLauncherContext.tsx');
|
|
exports.AppLauncherKeyboardCloseReason = object;
|
|
exports.AppLauncherBottomSheetExpandReason = object2;
|
|
exports.AppLauncherContext = value;
|
|
exports.useAppLauncherChatInputRefDummy = useAppLauncherChatInputRefDummy2;
|
|
exports.useRequiredAppLauncherContext = useRequiredAppLauncherContext;
|
|
exports.useAppLauncherContext = useAppLauncherContext;
|
|
function useAppLauncherChatInputRefDummy({noop}) { // fn#68619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8959:456, offset: 0x01c56553, size: 72 bytes, params: 2, frame: 13
|
|
return env0_2.useRef({getApplicationCommandManager: getApplicationCommandManager,
|
|
openCustomKeyboard: openCustomKeyboard, closeCustomKeyboard: closeCustomKeyboard});
|
|
function getApplicationCommandManager() { // fn#68620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8959:553, owner: useAppLauncherChatInputRefDummy.getApplicationCommandManager, offset: 0x01c5659b, size: 50 bytes, params: 1, frame: 11
|
|
if (noop) {
|
|
return undefined;
|
|
}
|
|
const Error = global.Error;
|
|
throw new Error('use useRequiredAppLauncherContext and provide a ChatInputRef');
|
|
}
|
|
|
|
function openCustomKeyboard() { // fn#68621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8959:664, owner: useAppLauncherChatInputRefDummy.openCustomKeyboard, offset: 0x01c5659b, size: 50 bytes, params: 1, frame: 11
|
|
if (noop) {
|
|
return undefined;
|
|
}
|
|
const Error = global.Error;
|
|
throw new Error('use useRequiredAppLauncherContext and provide a ChatInputRef');
|
|
}
|
|
|
|
function closeCustomKeyboard() { // fn#68622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8959:776, owner: useAppLauncherChatInputRefDummy.closeCustomKeyboard, offset: 0x01c5659b, size: 50 bytes, params: 1, frame: 11
|
|
if (noop) {
|
|
return undefined;
|
|
}
|
|
const Error = global.Error;
|
|
throw new Error('use useRequiredAppLauncherContext and provide a ChatInputRef');
|
|
}
|
|
|
|
}
|
|
|
|
function useRequiredAppLauncherContext() { // fn#68623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8959:1149, offset: 0x01c565cd, size: 66 bytes, params: 1, frame: 11
|
|
const value = env0_2.useContext(env0_4);
|
|
if (value == null) {
|
|
throw new global.Error('AppLauncherContext not found, must be used within AppLauncherNavigator');
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function useAppLauncherContext() { // fn#68624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8959:1347, offset: 0x01c5660f, size: 273 bytes, params: 1, frame: 19
|
|
const binding = env0_2;
|
|
const useRef = binding.useRef;
|
|
const DISMISSED = env0_3.DISMISSED;
|
|
const env0_0 = Reflect.apply(useRef, binding, [DISMISSED]);
|
|
const env0_1 = env0_2.useRef(undefined);
|
|
const value2 = (ReanimatedRexportModule).useSharedValue(-1);
|
|
var env0_2 = value2;
|
|
const value3 = (ReanimatedRexportModule).useSharedValue(0);
|
|
const AppLauncherEntrypoint = (AppLauncherTypesModule).AppLauncherEntrypoint;
|
|
const TEXT = AppLauncherEntrypoint.TEXT;
|
|
return env0_2.useContext(TEXT) ?? env0_2.useMemo(_fun68625,
|
|
[(require(8775) /* metro dependency 8775: useDefaultAppLauncherWidth */).useDefaultAppLauncherWidth(TEXT), TEXT,
|
|
useAppLauncherChatInputRefDummy({noop: false}), value2, value3]);
|
|
function _fun68625() { // fn#68625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8959:1619, offset: 0x01c56720, size: 76 bytes, params: 1, frame: 3
|
|
return {keyboardCloseReasonRef: env0_0, bottomSheetIndex: env0_2, bottomSheetPosition: env0_3,
|
|
bottomSheetExpandReasonRef: env0_1, chatInputRef: env0_6, width: env0_5, entrypoint: TEXT,
|
|
onActivityItemSelected: undefined};
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun68618, 8774, [31, 4017, 8048, 8775,
|
|
2]) /* metro module 8774, dependencies: [31, 4017, 8048, 8775, 2] */;
|