/* Metro module 10254; source: modules/channel/getChannelIcon.tsx; dependencies: [57, 1878, 661, 1360, 1423, 2] */ import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */ import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ function _fun79628(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10440:6, offset: 0x01e5b9b8, size: 169 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/channel/getChannelIcon.tsx'); exports.getChannelIconURL = getChannelIconURL_79629; exports.getChannelIconSource = getChannelIconSource_79630; function getChannelIconURL_79629(a0) { // fn#79629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10440:227, offset: 0x01e5ba61, size: 232 bytes, params: 2, frame: 18 var getChannelIconURL; var object; var recipients; var value2; var property; let value = a1; const r5 = value !== undefined ? value : 32; const type = a0.type; const DM = ChannelTypes.DM; if (DM === type) { recipients = a0.recipients; value2 = recipients.map(UserStore.getUser); value = Module00057(value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish), 1); property = value[0]; value = null; return value == property ? value : property.getAvatarURL(undefined, r5, a2); } const GROUP_DM = ChannelTypes.GROUP_DM; if (GROUP_DM === type) { value = importDefault(1423) /* metro dependency 1423: AvatarUtils */; getChannelIconURL = value.getChannelIconURL; object = {}; object.id = a0.id; object.icon = a0.icon; object.applicationId = a0.getApplicationId(); object.size = r5; return Reflect.apply(getChannelIconURL, value, [object]); } } function getChannelIconSource_79630(a0) { // fn#79630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10440:550, offset: 0x01e5bb49, size: 224 bytes, params: 2, frame: 15 var getChannelIconSource; var object; var recipients; var value2; var property; const type = a0.type; var value; const DM = ChannelTypes.DM; if (DM === type) { recipients = a0.recipients; value2 = recipients.map(UserStore.getUser); value = Module00057(value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish), 1); property = value[0]; value = null; return value != property ? property.getAvatarSource(undefined) : value; } const GROUP_DM = ChannelTypes.GROUP_DM; if (GROUP_DM === type) { value = importDefault(1423) /* metro dependency 1423: AvatarUtils */; getChannelIconSource = value.getChannelIconSource; object = {}; object.id = a0.id; object.icon = a0.icon; object.applicationId = a0.getApplicationId(); object.size = 128; return Reflect.apply(getChannelIconSource, value, [object]); } } } global.__d(_fun79628, 10254, [57, 1878, 661, 1360, 1423, 2]) /* metro module 10254, dependencies: [57, 1878, 661, 1360, 1423, 2] */;