/* Metro module 11134; source: modules/media_channel/native/useSetMediaPostThumbnail.tsx; dependencies: [31, 4645, 4644, 632, 4650, 7879, 4080, 2] */ import UploadAttachmentStore from '../../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */ 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 UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */ import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */ function _fun85175(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11320:6, offset: 0x01f66210, size: 159 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/media_channel/native/useSetMediaPostThumbnail.tsx'); exports.default = useSetMediaPostThumbnail; function useSetMediaPostThumbnail(a0, a1) { // fn#85176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11320:237, offset: 0x01f662af, size: 115 bytes, params: 3, frame: 17 const env0_0 = a0; const env0_1 = a1; return ReactModule.useCallback(_fun85179, [(UseStateFromStoresModule).useStateFromStores([UploadAttachmentStore], _fun85177), a0, a1]); function _fun85177() { // fn#85177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11320:314, offset: 0x01f66322, size: 70 bytes, params: 1, frame: 13 var environment; let value = environment.__proto__; const uploadAttachmentStoreBinding = UploadAttachmentStore; const getUploads = uploadAttachmentStoreBinding.getUploads; const binding = env0_0; const ChannelMessage = DraftType.ChannelMessage; value = Reflect.apply(getUploads, uploadAttachmentStoreBinding, [binding, ChannelMessage]); value = value.find(function(a0) { return (a0 == null || a0.item == null ? undefined : a0.item.platform) === require(dependencyMap[4]).UploadPlatform.REACT_NATIVE && a0.isThumbnail === true; }); const value3 = null; return value3 != value ? value : value3; } function _fun85179() { // fn#85179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11320:536, offset: 0x01f663c4, size: 319 bytes, params: 1, frame: 21 var isThumbnail; var r8; var value5; var defaultImport; var value7; var defaultImport2; const value2 = undefined; if ((require == null ? value2 : require.id) != null) { if (env0_2 != null && env0_2.id !== (require == null ? value2 : require.id)) { value5 = environment.__proto__; defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */; defaultImport.update(env0_0, env0_2.id, DraftType.ChannelMessage, {thumbnail: false}); } isThumbnail = require == null ? value2 : require.isThumbnail; r8 = isThumbnail != null && isThumbnail; value7 = environment.__proto__; defaultImport2 = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */; defaultImport2.update(env0_0, require == null ? value2 : require.id, DraftType.ChannelMessage, {thumbnail: !r8, spoiler: false}); (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(); } return value2; } } } global.__d(_fun85175, 11134, [31, 4645, 4644, 632, 4650, 7879, 4080, 2]) /* metro module 11134, dependencies: [31, 4645, 4644, 632, 4650, 7879, 4080, 2] */;