/* Metro module 12676; source: modules/share/native/ShareUtils.tsx; dependencies: [5, 4645, 4503, 3857, 9836, 7879, 7165, 4650, 4648, 7076, 7864, 7067, 2] */ import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */ import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as MessageConstantsModule from '../../messages/MessageConstants.tsx'; /* Metro dependency 4503 */ import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */ function _fun97128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:6, offset: 0x02173b51, size: 186 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/share/native/ShareUtils.tsx'); exports.showInformationToast = showInformationToast; exports.sendShareMessage = function() { return _sendShareMessage.apply(this, arguments); }; function _sendShareMessage() { // fn#97129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:156, offset: 0x02173c0b, size: 50 bytes, params: 1, frame: 14 return Module00005(_fun97131).apply(this, arguments); async function _fun97131({attachments, channel, comment}) { // fn#97131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:213, offset: 0x02173c51, size: 371 bytes, params: 2, frame: 24 var value8; if (false) { return undefined; } await undefined; if (false) { return undefined; } let id = channel.id; value = attachments.map(_fun97132); let binding = env2_1; const value5 = binding(env2_2[9]); const value7 = value5.parse(channel, comment ?? ''); if (value.length > 0) { value8 = env2_1(env2_2[5]); value8.clearAll(id, env2_4.ChannelMessage); } binding = env2_0; const binding2 = env2_2; const Future = binding(binding2[10]).Future; const future = new Future(); const value11 = env2_1(binding2[11]); const sendMessage = value11.sendMessage; id = channel.id; const SHARE_MODAL = env2_5.SHARE_MODAL; await Reflect.apply(sendMessage, value11, [id, value7, false, {location: SHARE_MODAL, doNotNotifyOnError: true, attachmentsToUpload: value, onAttachmentUploadError: onAttachmentUploadError_97133}]); if (false) { return undefined; } future.resolve(undefined); return future.promise; function _fun97132(a0) { // fn#97132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:280, offset: 0x02173dc4, size: 160 bytes, params: 2, frame: 15 const object = {}; object.uri = a0.uri; object.originalUri = a0.uri; object.mimeType = a0.mimeType; object.filename = a0.name; let value = environment.__proto__.__proto__.__proto__; const binding = env3_0; const binding2 = env3_2; const UploadPlatform = binding(binding2[7]).UploadPlatform; const REACT_NATIVE = UploadPlatform.REACT_NATIVE; object.platform = REACT_NATIVE; object.width = a0.width; object.height = a0.height; const CloudUpload = binding(binding2[8]).CloudUpload; const id = channel.id; value = Object.create(CloudUpload.prototype, {constructor: {value: CloudUpload}}); const cloudUpload = new CloudUpload(object, id); return cloudUpload instanceof Object ? cloudUpload : value; } function onAttachmentUploadError_97133() { // fn#97133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:718, offset: 0x02173e64, size: 169 bytes, params: 1, frame: 21 let binding = DraftStoreModule.DraftType; binding.reject(undefined); const object = {uploads: Module00005}; object.channelId = id; object.comment = comment; const uploads = object.uploads; const channelId = object.channelId; const comment2 = object.comment; binding = env3_1; const binding2 = env3_2; const value2 = binding(binding2[5]); const setUploads = value2.setUploads; let ChannelMessage = env3_4.ChannelMessage; Reflect.apply(setUploads, value2, [{channelId: channelId, uploads: uploads, draftType: ChannelMessage, resetState: true}]); const value3 = binding(binding2[6]); const saveDraft = value3.saveDraft; ChannelMessage = env3_4.ChannelMessage; Reflect.apply(saveDraft, value3, [channelId, comment2, ChannelMessage]); } } } function showInformationToast(a0) { // fn#97134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12866:1110, offset: 0x02173f0d, size: 91 bytes, params: 2, frame: 17 const open = ToastActionCreators.open; const object = {}; object.key = 'INFORMATION_TOAST-' + a0; object.content = a0; object.icon = importDefault(9836) /* metro dependency 9836 */; Reflect.apply(open, ToastActionCreators, [object]); } } global.__d(_fun97128, 12676, [5, 4645, 4503, 3857, 9836, 7879, 7165, 4650, 4648, 7076, 7864, 7067, 2]) /* metro module 12676, dependencies: [5, 4645, 4503, 3857, 9836, 7879, 7165, 4650, 4648, 7076, 7864, 7067, 2] */;