82 lines
4.5 KiB
TypeScript
82 lines
4.5 KiB
TypeScript
/* Metro module 8774; source: modules/app_launcher/native/AppLauncherContext.tsx; dependencies: [31, 4017, 8048, 8775, 2] */
|
|
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
|
|
var object3;
|
|
const env0_0 = require;
|
|
const closure = useAppLauncherChatInputRefDummy;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
object3 = {DISMISSED: 0};
|
|
object3[0] = 'DISMISSED';
|
|
object3.COMMAND = 1;
|
|
object3[1] = 'COMMAND';
|
|
object3.ACTIVITY = 2;
|
|
object3[2] = 'ACTIVITY';
|
|
object3.BACK = 3;
|
|
object3[3] = 'BACK';
|
|
object3.OAUTH_MODAL = 4;
|
|
object3[4] = 'OAUTH_MODAL';
|
|
const object4 = {GESTURE: 0};
|
|
object4[0] = 'GESTURE';
|
|
object4.KEYBOARD = 1;
|
|
object4[1] = 'KEYBOARD';
|
|
object4.APP_VIEW = 2;
|
|
object4[2] = 'APP_VIEW';
|
|
object4.COMMAND_VIEW = 3;
|
|
object4[3] = 'COMMAND_VIEW';
|
|
object4.OTHER = 4;
|
|
object4[4] = 'OTHER';
|
|
value = value.createContext(undefined);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/AppLauncherContext.tsx');
|
|
exports.AppLauncherKeyboardCloseReason = object3;
|
|
exports.AppLauncherBottomSheetExpandReason = object4;
|
|
exports.AppLauncherContext = value;
|
|
exports.useAppLauncherChatInputRefDummy = closure;
|
|
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_68621, closeCustomKeyboard: closeCustomKeyboard_68622});
|
|
}
|
|
|
|
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 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
|
var env0_2 = value2;
|
|
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
|
const AppLauncherEntrypoint = (require(8048) /* metro dependency 8048: AppLauncherTypes */).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 useAppLauncherChatInputRefDummyGetApplicationCommandManager() { // 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 _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};
|
|
}
|
|
|