706 lines
26 KiB
TypeScript
706 lines
26 KiB
TypeScript
// Module ID: 4650
|
|
// Function ID: 4651
|
|
// Name: getChannelIcon
|
|
// Dependencies: [1942, 1862, 1874, 676, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696, 4697, 4698, 4699, 4700, 4701, 4702, 4703, 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712, 4713, 4714, 4715, 4716, 2]
|
|
// Exports: getChannelIconComponentWithGuild, getChannelIconWithGuild, getChannelMentionIcon, getSimpleChannelIcon, getSimpleChannelIconComponent, getThreadChannelIcon
|
|
|
|
// Module 4650 (getChannelIcon)
|
|
import trackCommunicationDisabled from "trackCommunicationDisabled";
|
|
import createGuildRecordFromRust from "createGuildRecordFromRust";
|
|
import mergeGuildAvatar from "mergeGuildAvatar";
|
|
import { ChannelTypes } from "ME";
|
|
|
|
const require = arg1;
|
|
function getChannelIcon(channel, ignoreTraits) {
|
|
let isRulesChannel;
|
|
let locked;
|
|
let obj = ignoreTraits;
|
|
if (ignoreTraits == null) {
|
|
obj = {};
|
|
}
|
|
({ isRulesChannel, locked } = obj);
|
|
const items = [createGuildRecordFromRust, mergeGuildAvatar, trackCommunicationDisabled];
|
|
const result = require(4676) /* shouldShowMembershipVerificationGate */.shouldShowMembershipVerificationGate(channel.guild_id, items);
|
|
if (channel.isForumPost()) {
|
|
return importDefault(4669);
|
|
} else {
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type) {
|
|
let tmp4 = importDefault(4651);
|
|
} else if (tmp3.ANNOUNCEMENT_THREAD === type) {
|
|
tmp4 = importDefault(4652);
|
|
} else {
|
|
tmp4 = null;
|
|
}
|
|
if (null != tmp4) {
|
|
return tmp4;
|
|
} else {
|
|
const isMediaChannelResult = channel.isMediaChannel();
|
|
const isNSFWResult = channel.isNSFW();
|
|
const type3 = channel.type;
|
|
if (tmp3.PRIVATE_THREAD !== type3) {
|
|
if (tmp3.ANNOUNCEMENT_THREAD !== type3) {
|
|
if (tmp3.PUBLIC_THREAD !== type3) {
|
|
if (tmp3.GUILD_CATEGORY === type3) {
|
|
return importDefault(4653);
|
|
} else if (tmp3.GUILD_TEXT === type3) {
|
|
if (isRulesChannel) {
|
|
let tmp69 = importDefault(4679);
|
|
} else {
|
|
if (isNSFWResult) {
|
|
ignoreTraits = undefined;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits) {
|
|
tmp69 = importDefault(4665);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits1;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits1 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits1) {
|
|
importDefault(4666);
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits2;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits2 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits2) {
|
|
let tmp72Result = tmp72(4675);
|
|
}
|
|
}
|
|
if (null != channel.linkedLobby) {
|
|
tmp72Result = tmp72(4681);
|
|
} else {
|
|
tmp72Result = tmp72(4654);
|
|
}
|
|
}
|
|
return tmp69;
|
|
} else if (tmp3.GUILD_FORUM === type3) {
|
|
if (isRulesChannel) {
|
|
let tmp58 = importDefault(4679);
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits3;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits3 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits3) {
|
|
tmp58 = importDefault(isMediaChannelResult ? 4674 : 4671);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits4;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits4 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits4) {
|
|
importDefault(4672);
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits5;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits5 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits5) {
|
|
tmp61(isMediaChannelResult ? 4682 : 4683);
|
|
}
|
|
}
|
|
importDefault(isMediaChannelResult ? 4673 : 4670);
|
|
}
|
|
return tmp58;
|
|
} else if (tmp3.GUILD_MEDIA === type3) {
|
|
if (isRulesChannel) {
|
|
let tmp48 = importDefault(4679);
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits6;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits6 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits6) {
|
|
tmp48 = importDefault(4674);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits7;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits7 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits7) {
|
|
importDefault(4672);
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits8;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits8 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits8) {
|
|
let tmp51Result = tmp51(4682);
|
|
}
|
|
}
|
|
tmp51Result = tmp51(4673);
|
|
}
|
|
return tmp48;
|
|
} else if (tmp3.GROUP_DM === type3) {
|
|
return importDefault(4655);
|
|
} else if (tmp3.DM === type3) {
|
|
return importDefault(4656);
|
|
} else if (tmp3.GUILD_ANNOUNCEMENT === type3) {
|
|
if (isRulesChannel) {
|
|
let tmp35 = importDefault(4679);
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits9;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits9 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits9) {
|
|
tmp35 = importDefault(4667);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits10;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits10 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits10) {
|
|
importDefault(4668);
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits11;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits11 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits11) {
|
|
let tmp38Result = tmp38(4684);
|
|
}
|
|
}
|
|
tmp38Result = tmp38(4657);
|
|
}
|
|
return tmp35;
|
|
} else if (tmp3.GUILD_STAGE_VOICE === type3) {
|
|
if (result) {
|
|
let ignoreTraits12;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits12 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits12) {
|
|
if (importDefault(4680)(channel)) {
|
|
let tmp24Result = tmp24(4685);
|
|
} else {
|
|
tmp24Result = tmp24(4664);
|
|
}
|
|
return tmp24Result;
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits13;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits13 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits13) {
|
|
importDefault(4685);
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits14;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits14 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits14) {
|
|
let tmp28Result = tmp28(4664);
|
|
}
|
|
}
|
|
tmp28Result = tmp28(4658);
|
|
} else if (tmp3.GUILD_VOICE === type3) {
|
|
if (obj.textFocused) {
|
|
let tmp9Result = importDefault(4669);
|
|
} else {
|
|
if (result) {
|
|
let ignoreTraits15;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits15 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits15) {
|
|
if (importDefault(4680)(channel)) {
|
|
tmp9Result = tmp9(4685);
|
|
} else {
|
|
tmp9Result = tmp9(4661);
|
|
}
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits16;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits16 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits16) {
|
|
importDefault(4685);
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits17;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits17 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits17) {
|
|
tmp13(4661);
|
|
}
|
|
}
|
|
if (isNSFWResult) {
|
|
let ignoreTraits18;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits18 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits18) {
|
|
tmp13(4662);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits19;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits19 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits19) {
|
|
let tmp13Result1 = tmp13(4663);
|
|
}
|
|
}
|
|
tmp13Result1 = tmp13(4659);
|
|
}
|
|
return tmp9Result;
|
|
} else if (tmp3.GUILD_DIRECTORY === type3) {
|
|
return importDefault(4660);
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const type2 = channel.type;
|
|
if (tmp3.PRIVATE_THREAD === type2) {
|
|
let tmp80 = importDefault(4651);
|
|
} else if (tmp3.ANNOUNCEMENT_THREAD === type2) {
|
|
tmp80 = importDefault(4652);
|
|
} else {
|
|
tmp80 = null;
|
|
}
|
|
return tmp80;
|
|
}
|
|
}
|
|
const obj2 = require(4676) /* shouldShowMembershipVerificationGate */;
|
|
}
|
|
function getChannelIconComponent(channel, ignoreTraits) {
|
|
let isRulesChannel;
|
|
let locked;
|
|
let obj = ignoreTraits;
|
|
if (ignoreTraits == null) {
|
|
obj = {};
|
|
}
|
|
({ isRulesChannel, locked } = obj);
|
|
const items = [createGuildRecordFromRust, mergeGuildAvatar, trackCommunicationDisabled];
|
|
const result = require(4676) /* shouldShowMembershipVerificationGate */.shouldShowMembershipVerificationGate(channel.guild_id, items);
|
|
if (channel.isForumPost()) {
|
|
return tmp(4686).ChatIcon;
|
|
} else {
|
|
const isMediaChannelResult = channel.isMediaChannel();
|
|
const isNSFWResult = channel.isNSFW();
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type) {
|
|
return tmp(4687).ThreadLockIcon;
|
|
} else {
|
|
if (tmp6.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp6.PUBLIC_THREAD !== type) {
|
|
if (tmp6.GUILD_CATEGORY === type) {
|
|
return tmp(4689).FolderIcon;
|
|
} else if (tmp6.GUILD_TEXT === type) {
|
|
if (isRulesChannel) {
|
|
let TextWarningIcon = tmp(4690).BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
ignoreTraits = undefined;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits) {
|
|
TextWarningIcon = tmp(4691).TextWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits1;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits1 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits1) {
|
|
const TextSpoilerIcon = tmp(4692).TextSpoilerIcon;
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits2;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits2 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits2) {
|
|
const TextLockIcon = tmp(4693).TextLockIcon;
|
|
}
|
|
}
|
|
if (null != channel.linkedLobby) {
|
|
let TextIcon = tmp(4694).TextControllerIcon;
|
|
} else {
|
|
TextIcon = tmp(4695).TextIcon;
|
|
}
|
|
}
|
|
return TextWarningIcon;
|
|
} else if (tmp6.GUILD_FORUM === type) {
|
|
if (isRulesChannel) {
|
|
let ForumWarningIcon = tmp(4690).BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits3;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits3 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits3) {
|
|
if (isMediaChannelResult) {
|
|
ForumWarningIcon = tmp(4696).ImageWarningIcon;
|
|
} else {
|
|
ForumWarningIcon = tmp(4697).ForumWarningIcon;
|
|
}
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits4;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits4 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits4) {
|
|
const ForumSpoilerIcon2 = tmp(4698).ForumSpoilerIcon;
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits5;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits5 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits5) {
|
|
if (isMediaChannelResult) {
|
|
let ForumLockIcon = tmp(4699).ImageLockIcon;
|
|
} else {
|
|
ForumLockIcon = tmp(4700).ForumLockIcon;
|
|
}
|
|
}
|
|
}
|
|
if (isMediaChannelResult) {
|
|
let ForumIcon = tmp(4701).ImageIcon;
|
|
} else {
|
|
ForumIcon = tmp(4702).ForumIcon;
|
|
}
|
|
}
|
|
return ForumWarningIcon;
|
|
} else if (tmp6.GUILD_MEDIA === type) {
|
|
if (isRulesChannel) {
|
|
let ImageWarningIcon = tmp(4690).BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits6;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits6 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits6) {
|
|
ImageWarningIcon = tmp(4696).ImageWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits7;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits7 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits7) {
|
|
const ForumSpoilerIcon = tmp(4698).ForumSpoilerIcon;
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits8;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits8 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits8) {
|
|
let ImageIcon = tmp(4699).ImageLockIcon;
|
|
}
|
|
}
|
|
ImageIcon = tmp(4701).ImageIcon;
|
|
}
|
|
return ImageWarningIcon;
|
|
} else if (tmp6.GROUP_DM === type) {
|
|
return tmp(4703).GroupIcon;
|
|
} else if (tmp6.DM === type) {
|
|
return tmp(4704).AtIcon;
|
|
} else if (tmp6.GUILD_ANNOUNCEMENT === type) {
|
|
if (isRulesChannel) {
|
|
let AnnouncementsWarningIcon = tmp(4690).BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits9;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits9 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits9) {
|
|
AnnouncementsWarningIcon = tmp(4705).AnnouncementsWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits10;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits10 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits10) {
|
|
const AnnouncementsSpoilerIcon = tmp(4706).AnnouncementsSpoilerIcon;
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits11;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits11 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits11) {
|
|
let AnnouncementsIcon = tmp(4707).AnnouncementsLockIcon;
|
|
}
|
|
}
|
|
AnnouncementsIcon = tmp(4708).AnnouncementsIcon;
|
|
}
|
|
return AnnouncementsWarningIcon;
|
|
} else if (tmp6.GUILD_STAGE_VOICE === type) {
|
|
if (result) {
|
|
let ignoreTraits12;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits12 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits12) {
|
|
if (importDefault(4680)(channel)) {
|
|
let StageLockIcon = tmp(4709).LockIcon;
|
|
} else {
|
|
StageLockIcon = tmp(4710).StageLockIcon;
|
|
}
|
|
return StageLockIcon;
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits13;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits13 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits13) {
|
|
const LockIcon2 = tmp(4709).LockIcon;
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits14;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits14 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits14) {
|
|
let StageIcon = tmp(4710).StageLockIcon;
|
|
}
|
|
}
|
|
StageIcon = tmp(4711).StageIcon;
|
|
} else if (tmp6.GUILD_VOICE === type) {
|
|
if (obj.textFocused) {
|
|
let VoiceLockIcon = tmp(4686).ChatIcon;
|
|
} else {
|
|
if (result) {
|
|
let ignoreTraits15;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits15 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits15) {
|
|
if (importDefault(4680)(channel)) {
|
|
VoiceLockIcon = tmp(4709).LockIcon;
|
|
} else {
|
|
VoiceLockIcon = tmp(4712).VoiceLockIcon;
|
|
}
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits16;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits16 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits16) {
|
|
const LockIcon = tmp(4709).LockIcon;
|
|
}
|
|
}
|
|
if (importDefault(4680)(channel)) {
|
|
let ignoreTraits17;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits17 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits17) {
|
|
const VoiceLockIcon2 = tmp(4712).VoiceLockIcon;
|
|
}
|
|
}
|
|
if (isNSFWResult) {
|
|
let ignoreTraits18;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits18 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits18) {
|
|
const VoiceWarningIcon = tmp(4713).VoiceWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits19;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits19 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits19) {
|
|
let VoiceNormalIcon = tmp(4714).VoiceNormalSpoilerIcon;
|
|
}
|
|
}
|
|
VoiceNormalIcon = tmp(4715).VoiceNormalIcon;
|
|
}
|
|
return VoiceLockIcon;
|
|
} else if (tmp6.GUILD_DIRECTORY === type) {
|
|
return tmp(4716).HubIcon;
|
|
}
|
|
}
|
|
}
|
|
return tmp(4688).ThreadIcon;
|
|
}
|
|
}
|
|
const obj2 = require(4676) /* shouldShowMembershipVerificationGate */;
|
|
}
|
|
let result = require("mergeGuildAvatar").fileFinishedImporting("utils/native/ChannelUtils.tsx");
|
|
|
|
export const getThreadChannelIcon = function getThreadChannelIcon(arg0) {
|
|
if (ChannelTypes.PRIVATE_THREAD === arg0) {
|
|
return importDefault(4651);
|
|
} else {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== arg0) {
|
|
if (tmp.PUBLIC_THREAD !== arg0) {
|
|
return null;
|
|
}
|
|
}
|
|
return importDefault(4652);
|
|
}
|
|
};
|
|
export const getSimpleChannelIcon = function getSimpleChannelIcon(channel) {
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type) {
|
|
let tmp2 = importDefault(4651);
|
|
} else if (tmp.ANNOUNCEMENT_THREAD === type) {
|
|
tmp2 = importDefault(4652);
|
|
} else {
|
|
tmp2 = null;
|
|
}
|
|
if (null != tmp2) {
|
|
return tmp2;
|
|
} else {
|
|
const type3 = channel.type;
|
|
if (tmp.PRIVATE_THREAD !== type3) {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== type3) {
|
|
if (tmp.PUBLIC_THREAD !== type3) {
|
|
if (tmp.GUILD_CATEGORY === type3) {
|
|
return importDefault(4653);
|
|
} else {
|
|
if (tmp.GUILD_TEXT !== type3) {
|
|
if (tmp.GUILD_FORUM !== type3) {
|
|
if (tmp.GUILD_MEDIA !== type3) {
|
|
if (tmp.GROUP_DM === type3) {
|
|
return importDefault(4655);
|
|
} else if (tmp.DM === type3) {
|
|
return importDefault(4656);
|
|
} else if (tmp.GUILD_ANNOUNCEMENT === type3) {
|
|
return importDefault(4657);
|
|
} else if (tmp.GUILD_STAGE_VOICE === type3) {
|
|
return importDefault(4658);
|
|
} else if (tmp.GUILD_VOICE === type3) {
|
|
return importDefault(4659);
|
|
} else if (tmp.GUILD_DIRECTORY === type3) {
|
|
return importDefault(4660);
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return importDefault(4654);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const type2 = channel.type;
|
|
if (tmp.PRIVATE_THREAD === type2) {
|
|
let tmp23 = importDefault(4651);
|
|
} else if (tmp.ANNOUNCEMENT_THREAD === type2) {
|
|
tmp23 = importDefault(4652);
|
|
} else {
|
|
tmp23 = null;
|
|
}
|
|
return tmp23;
|
|
}
|
|
};
|
|
export const getChannelIconWithGuild = function getChannelIconWithGuild(channel, guild) {
|
|
let rulesChannelId;
|
|
if (guild != null) {
|
|
rulesChannelId = guild.rulesChannelId;
|
|
}
|
|
return getChannelIcon(channel, { isRulesChannel: rulesChannelId === channel.id });
|
|
};
|
|
export const getChannelMentionIcon = function getChannelMentionIcon(iconType) {
|
|
return importDefault(4675);
|
|
};
|
|
export { getChannelIcon };
|
|
export const getChannelIconComponentWithGuild = function getChannelIconComponentWithGuild(channel, guild) {
|
|
let rulesChannelId;
|
|
if (guild != null) {
|
|
rulesChannelId = guild.rulesChannelId;
|
|
}
|
|
return getChannelIconComponent(channel, { isRulesChannel: rulesChannelId === channel.id });
|
|
};
|
|
export { getChannelIconComponent };
|
|
export const getSimpleChannelIconComponent = function getSimpleChannelIconComponent(channel) {
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD !== type) {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp.PUBLIC_THREAD !== type) {
|
|
if (tmp.GUILD_CATEGORY === type) {
|
|
return require(4689) /* FolderIcon */.FolderIcon;
|
|
} else if (tmp.GUILD_TEXT === type) {
|
|
return require(4695) /* TextIcon */.TextIcon;
|
|
} else if (tmp.GUILD_FORUM === type) {
|
|
return require(4702) /* ForumIcon */.ForumIcon;
|
|
} else if (tmp.GUILD_MEDIA === type) {
|
|
return require(4701) /* ImageIcon */.ImageIcon;
|
|
} else if (tmp.GROUP_DM === type) {
|
|
return require(4703) /* GroupIcon */.GroupIcon;
|
|
} else if (tmp.DM === type) {
|
|
return require(4704) /* AtIcon */.AtIcon;
|
|
} else if (tmp.GUILD_ANNOUNCEMENT === type) {
|
|
return require(4708) /* AnnouncementsIcon */.AnnouncementsIcon;
|
|
} else if (tmp.GUILD_STAGE_VOICE === type) {
|
|
return require(4711) /* StageIcon */.StageIcon;
|
|
} else if (tmp.GUILD_VOICE === type) {
|
|
return require(4715) /* VoiceNormalIcon */.VoiceNormalIcon;
|
|
} else if (tmp.GUILD_DIRECTORY === type) {
|
|
return require(4716) /* HubIcon */.HubIcon;
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (channel.isForumPost()) {
|
|
let ThreadIcon = tmp23(4686).ChatIcon;
|
|
} else {
|
|
ThreadIcon = tmp23(4688).ThreadIcon;
|
|
}
|
|
return ThreadIcon;
|
|
};
|