/* Metro module 11752; source: modules/application_commands/native/ApplicationCommandUtils.tsx; dependencies: [4645, 4644, 5066, 1423, 11753, 11754, 5068, 1860, 11093, 7879, 2] */ function _fun90058(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:6, offset: 0x02028f7a, size: 175 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType; const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */; const env0_5 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/application_commands/native/ApplicationCommandUtils.tsx'); exports.getApplicationCommandsIconSource = getApplicationCommandsIconSource; exports.openCommandAttachmentPreview = openCommandAttachmentPreview; } function getApplicationCommandsIconSource(a0, a1) { // fn#90059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:286, offset: 0x02029029, size: 308 bytes, params: 3, frame: 17 var r2; var getApplicationIconSource; var application; if (a0 == null) { return null; } const id = a0.id; var value; const BUILT_IN = BuiltInSectionId.BUILT_IN; if (BUILT_IN === id) { return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11753) /* metro dependency 11753 */); } const FRECENCY = BuiltInSectionId.FRECENCY; if (FRECENCY === id) { return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(importDefault(11754) /* metro dependency 11754 */); } const type = a0.type; const value2 = undefined; const ApplicationCommandSectionType = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandSectionType; const APPLICATION = ApplicationCommandSectionType.APPLICATION; if (type === APPLICATION) { value = importDefault(1423) /* metro dependency 1423: AvatarUtils */; getApplicationIconSource = value.getApplicationIconSource; application = a0.application; value = Reflect.apply(getApplicationIconSource, value, [{id: a0.id, icon: a0.icon, bot: application == null ? value2 : application.bot, botIconFirst: true, guildMember: a1}]); r2 = value; } else { r2 = importDefault(1860) /* metro dependency 1860 */; } return r2; } function openCommandAttachmentPreview(a0, a1, a2, a3) { // fn#90060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:671, offset: 0x0202915d, size: 132 bytes, params: 5, frame: 17 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; const getUpload = UploadAttachmentStore.getUpload; const SlashCommand = DraftType.SlashCommand; const value2 = Reflect.apply(getUpload, UploadAttachmentStore, [a1, a2, SlashCommand]); if (value2 != null) { (importDefault(11093) /* metro dependency 11093: showUploadPreviewActionSheet */)({channelId: a1, disableSpoiler: true, onClose: a3, onRemove: onRemove, upload: value2}); } } function openCommandAttachmentPreviewOnRemove() { // fn#90061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11938:823, owner: openCommandAttachmentPreview.onRemove, offset: 0x020291e1, size: 189 bytes, params: 1, frame: 18 var environment; const value = environment.__proto__; const value2 = undefined; const defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */; const remove = defaultImport.remove; const id = env0_3.id; const SlashCommand = DraftType.SlashCommand; Reflect.apply(remove, defaultImport, [require, id, SlashCommand]); const r5 = env0_0 == null || env0_0.props.activeCommand == null || env0_0.props.activeCommand.options == null ? value2 : env0_0.props.activeCommand.options.find(function({name}) { return name === importDefault; }); if (r5 != null) { if (env0_0 != null) { env0_0.insertOrJumpCommandOption(r5, value2, false, {displayText: ''}); } } return value2; }