/* Metro module 7242; source: modules/autocompleter/createAutocompleterResultForChannelId.tsx; dependencies: [1379, 3793, 1878, 6587, 661, 4805, 2] */ import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ import * as UseChannelNameModule from '../channel/useChannelName.tsx'; /* Metro dependency 4805 */ import * as AutocompleterConstantsModule from './AutocompleterConstants.tsx'; /* Metro dependency 6587 */ function _fun58227(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7420:6, offset: 0x016c22b9, size: 188 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/autocompleter/createAutocompleterResultForChannelId.tsx'); exports.default = createAutocompleterResultForChannelId; function createAutocompleterResultForChannelId(a0) { // fn#58228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7420:291, offset: 0x016c2375, size: 341 bytes, params: 2, frame: 19 let value = a1; const value2 = a2; const value3 = a3; const r2 = value !== undefined ? value : ChannelStore; const r4 = value2 !== undefined ? value2 : UserStore; const r3 = value3 !== undefined ? value3 : RelationshipStore; value = r2.getChannel(a0); const value4 = null; if (value4 == value) { return value4; } const channelName = (UseChannelNameModule).computeChannelName(value, r4, r3); const type = value.type; const DM = ChannelTypes.DM; if (DM === type) { value = r4.getUser(value.getRecipientId()); return value4 == value ? value4 : {type: AutocompleterResultTypes.USER, record: value, score: 0, comparator: channelName}; } const GROUP_DM = ChannelTypes.GROUP_DM; if (GROUP_DM === type) { return {type: AutocompleterResultTypes.GROUP_DM, record: value, score: 0, comparator: channelName}; } const GUILD_VOICE = ChannelTypes.GUILD_VOICE; if (GUILD_VOICE === type) { return {type: AutocompleterResultTypes.VOICE_CHANNEL, record: value, score: 0, comparator: channelName}; } const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE; if (GUILD_STAGE_VOICE === type) { return {type: AutocompleterResultTypes.VOICE_CHANNEL, record: value, score: 0, comparator: channelName}; } const TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL; return {type: TEXT_CHANNEL, record: value, score: 0, comparator: channelName}; } } global.__d(_fun58227, 7242, [1379, 3793, 1878, 6587, 661, 4805, 2]) /* metro module 7242, dependencies: [1379, 3793, 1878, 6587, 661, 4805, 2] */;