706 lines
26 KiB
TypeScript
706 lines
26 KiB
TypeScript
// Module ID: 4716
|
|
// Function ID: 4717
|
|
// Name: getChannelIcon
|
|
// Dependencies: [1942, 1862, 1874, 676, 4717, 4718, 4719, 4720, 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, 4740, 4741, 4742, 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753, 4754, 4755, 4756, 4757, 4758, 4759, 4760, 4761, 4762, 4763, 4764, 4765, 4766, 4767, 4768, 4769, 4770, 4771, 4772, 4773, 4774, 4775, 4776, 4777, 4778, 4779, 4780, 4781, 4782, 2]
|
|
// Exports: getChannelIconComponentWithGuild, getChannelIconWithGuild, getChannelMentionIcon, getSimpleChannelIcon, getSimpleChannelIconComponent, getThreadChannelIcon
|
|
|
|
// Module 4716 (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(4742) /* shouldShowMembershipVerificationGate */.shouldShowMembershipVerificationGate(channel.guild_id, items);
|
|
if (channel.isForumPost()) {
|
|
return importDefault(4735);
|
|
} else {
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type) {
|
|
let tmp4 = importDefault(4717);
|
|
} else if (tmp3.ANNOUNCEMENT_THREAD === type) {
|
|
tmp4 = importDefault(4718);
|
|
} 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(4719);
|
|
} else if (tmp3.GUILD_TEXT === type3) {
|
|
if (isRulesChannel) {
|
|
let tmp69 = importDefault(4745);
|
|
} else {
|
|
if (isNSFWResult) {
|
|
ignoreTraits = undefined;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits) {
|
|
tmp69 = importDefault(4731);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits1;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits1 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits1) {
|
|
importDefault(4732);
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits2;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits2 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits2) {
|
|
let tmp72Result = tmp72(4741);
|
|
}
|
|
}
|
|
if (null != channel.linkedLobby) {
|
|
tmp72Result = tmp72(4747);
|
|
} else {
|
|
tmp72Result = tmp72(4720);
|
|
}
|
|
}
|
|
return tmp69;
|
|
} else if (tmp3.GUILD_FORUM === type3) {
|
|
if (isRulesChannel) {
|
|
let tmp58 = importDefault(4745);
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits3;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits3 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits3) {
|
|
tmp58 = importDefault(isMediaChannelResult ? 4740 : 4737);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits4;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits4 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits4) {
|
|
importDefault(4738);
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits5;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits5 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits5) {
|
|
tmp61(isMediaChannelResult ? 4748 : 4749);
|
|
}
|
|
}
|
|
importDefault(isMediaChannelResult ? 4739 : 4736);
|
|
}
|
|
return tmp58;
|
|
} else if (tmp3.GUILD_MEDIA === type3) {
|
|
if (isRulesChannel) {
|
|
let tmp48 = importDefault(4745);
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits6;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits6 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits6) {
|
|
tmp48 = importDefault(4740);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits7;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits7 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits7) {
|
|
importDefault(4738);
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits8;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits8 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits8) {
|
|
let tmp51Result = tmp51(4748);
|
|
}
|
|
}
|
|
tmp51Result = tmp51(4739);
|
|
}
|
|
return tmp48;
|
|
} else if (tmp3.GROUP_DM === type3) {
|
|
return importDefault(4721);
|
|
} else if (tmp3.DM === type3) {
|
|
return importDefault(4722);
|
|
} else if (tmp3.GUILD_ANNOUNCEMENT === type3) {
|
|
if (isRulesChannel) {
|
|
let tmp35 = importDefault(4745);
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits9;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits9 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits9) {
|
|
tmp35 = importDefault(4733);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits10;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits10 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits10) {
|
|
importDefault(4734);
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits11;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits11 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits11) {
|
|
let tmp38Result = tmp38(4750);
|
|
}
|
|
}
|
|
tmp38Result = tmp38(4723);
|
|
}
|
|
return tmp35;
|
|
} else if (tmp3.GUILD_STAGE_VOICE === type3) {
|
|
if (result) {
|
|
let ignoreTraits12;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits12 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits12) {
|
|
if (importDefault(4746)(channel)) {
|
|
let tmp24Result = tmp24(4751);
|
|
} else {
|
|
tmp24Result = tmp24(4730);
|
|
}
|
|
return tmp24Result;
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits13;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits13 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits13) {
|
|
importDefault(4751);
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits14;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits14 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits14) {
|
|
let tmp28Result = tmp28(4730);
|
|
}
|
|
}
|
|
tmp28Result = tmp28(4724);
|
|
} else if (tmp3.GUILD_VOICE === type3) {
|
|
if (obj.textFocused) {
|
|
let tmp9Result = importDefault(4735);
|
|
} else {
|
|
if (result) {
|
|
let ignoreTraits15;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits15 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits15) {
|
|
if (importDefault(4746)(channel)) {
|
|
tmp9Result = tmp9(4751);
|
|
} else {
|
|
tmp9Result = tmp9(4727);
|
|
}
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits16;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits16 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits16) {
|
|
importDefault(4751);
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits17;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits17 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits17) {
|
|
tmp13(4727);
|
|
}
|
|
}
|
|
if (isNSFWResult) {
|
|
let ignoreTraits18;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits18 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits18) {
|
|
tmp13(4728);
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits19;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits19 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits19) {
|
|
let tmp13Result1 = tmp13(4729);
|
|
}
|
|
}
|
|
tmp13Result1 = tmp13(4725);
|
|
}
|
|
return tmp9Result;
|
|
} else if (tmp3.GUILD_DIRECTORY === type3) {
|
|
return importDefault(4726);
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const type2 = channel.type;
|
|
if (tmp3.PRIVATE_THREAD === type2) {
|
|
let tmp80 = importDefault(4717);
|
|
} else if (tmp3.ANNOUNCEMENT_THREAD === type2) {
|
|
tmp80 = importDefault(4718);
|
|
} else {
|
|
tmp80 = null;
|
|
}
|
|
return tmp80;
|
|
}
|
|
}
|
|
const obj2 = require(4742) /* 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(4742) /* shouldShowMembershipVerificationGate */.shouldShowMembershipVerificationGate(channel.guild_id, items);
|
|
if (channel.isForumPost()) {
|
|
return tmp(4752).ChatIcon;
|
|
} else {
|
|
const isMediaChannelResult = channel.isMediaChannel();
|
|
const isNSFWResult = channel.isNSFW();
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type) {
|
|
return tmp(4753).ThreadLockIcon;
|
|
} else {
|
|
if (tmp6.ANNOUNCEMENT_THREAD !== type) {
|
|
if (tmp6.PUBLIC_THREAD !== type) {
|
|
if (tmp6.GUILD_CATEGORY === type) {
|
|
return tmp(4755).FolderIcon;
|
|
} else if (tmp6.GUILD_TEXT === type) {
|
|
if (isRulesChannel) {
|
|
let TextWarningIcon = tmp(4756).BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
ignoreTraits = undefined;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits) {
|
|
TextWarningIcon = tmp(4757).TextWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits1;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits1 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits1) {
|
|
const TextSpoilerIcon = tmp(4758).TextSpoilerIcon;
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits2;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits2 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits2) {
|
|
const TextLockIcon = tmp(4759).TextLockIcon;
|
|
}
|
|
}
|
|
if (null != channel.linkedLobby) {
|
|
let TextIcon = tmp(4760).TextControllerIcon;
|
|
} else {
|
|
TextIcon = tmp(4761).TextIcon;
|
|
}
|
|
}
|
|
return TextWarningIcon;
|
|
} else if (tmp6.GUILD_FORUM === type) {
|
|
if (isRulesChannel) {
|
|
let ForumWarningIcon = tmp(4756).BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits3;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits3 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits3) {
|
|
if (isMediaChannelResult) {
|
|
ForumWarningIcon = tmp(4762).ImageWarningIcon;
|
|
} else {
|
|
ForumWarningIcon = tmp(4763).ForumWarningIcon;
|
|
}
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits4;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits4 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits4) {
|
|
const ForumSpoilerIcon2 = tmp(4764).ForumSpoilerIcon;
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits5;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits5 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits5) {
|
|
if (isMediaChannelResult) {
|
|
let ForumLockIcon = tmp(4765).ImageLockIcon;
|
|
} else {
|
|
ForumLockIcon = tmp(4766).ForumLockIcon;
|
|
}
|
|
}
|
|
}
|
|
if (isMediaChannelResult) {
|
|
let ForumIcon = tmp(4767).ImageIcon;
|
|
} else {
|
|
ForumIcon = tmp(4768).ForumIcon;
|
|
}
|
|
}
|
|
return ForumWarningIcon;
|
|
} else if (tmp6.GUILD_MEDIA === type) {
|
|
if (isRulesChannel) {
|
|
let ImageWarningIcon = tmp(4756).BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits6;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits6 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits6) {
|
|
ImageWarningIcon = tmp(4762).ImageWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits7;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits7 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits7) {
|
|
const ForumSpoilerIcon = tmp(4764).ForumSpoilerIcon;
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits8;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits8 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits8) {
|
|
let ImageIcon = tmp(4765).ImageLockIcon;
|
|
}
|
|
}
|
|
ImageIcon = tmp(4767).ImageIcon;
|
|
}
|
|
return ImageWarningIcon;
|
|
} else if (tmp6.GROUP_DM === type) {
|
|
return tmp(4769).GroupIcon;
|
|
} else if (tmp6.DM === type) {
|
|
return tmp(4770).AtIcon;
|
|
} else if (tmp6.GUILD_ANNOUNCEMENT === type) {
|
|
if (isRulesChannel) {
|
|
let AnnouncementsWarningIcon = tmp(4756).BookCheckIcon;
|
|
} else {
|
|
if (isNSFWResult) {
|
|
let ignoreTraits9;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits9 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits9) {
|
|
AnnouncementsWarningIcon = tmp(4771).AnnouncementsWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits10;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits10 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits10) {
|
|
const AnnouncementsSpoilerIcon = tmp(4772).AnnouncementsSpoilerIcon;
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits11;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits11 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits11) {
|
|
let AnnouncementsIcon = tmp(4773).AnnouncementsLockIcon;
|
|
}
|
|
}
|
|
AnnouncementsIcon = tmp(4774).AnnouncementsIcon;
|
|
}
|
|
return AnnouncementsWarningIcon;
|
|
} else if (tmp6.GUILD_STAGE_VOICE === type) {
|
|
if (result) {
|
|
let ignoreTraits12;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits12 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits12) {
|
|
if (importDefault(4746)(channel)) {
|
|
let StageLockIcon = tmp(4775).LockIcon;
|
|
} else {
|
|
StageLockIcon = tmp(4776).StageLockIcon;
|
|
}
|
|
return StageLockIcon;
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits13;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits13 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits13) {
|
|
const LockIcon2 = tmp(4775).LockIcon;
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits14;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits14 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits14) {
|
|
let StageIcon = tmp(4776).StageLockIcon;
|
|
}
|
|
}
|
|
StageIcon = tmp(4777).StageIcon;
|
|
} else if (tmp6.GUILD_VOICE === type) {
|
|
if (obj.textFocused) {
|
|
let VoiceLockIcon = tmp(4752).ChatIcon;
|
|
} else {
|
|
if (result) {
|
|
let ignoreTraits15;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits15 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits15) {
|
|
if (importDefault(4746)(channel)) {
|
|
VoiceLockIcon = tmp(4775).LockIcon;
|
|
} else {
|
|
VoiceLockIcon = tmp(4778).VoiceLockIcon;
|
|
}
|
|
}
|
|
}
|
|
if (locked) {
|
|
let ignoreTraits16;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits16 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits16) {
|
|
const LockIcon = tmp(4775).LockIcon;
|
|
}
|
|
}
|
|
if (importDefault(4746)(channel)) {
|
|
let ignoreTraits17;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits17 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits17) {
|
|
const VoiceLockIcon2 = tmp(4778).VoiceLockIcon;
|
|
}
|
|
}
|
|
if (isNSFWResult) {
|
|
let ignoreTraits18;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits18 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits18) {
|
|
const VoiceWarningIcon = tmp(4779).VoiceWarningIcon;
|
|
}
|
|
}
|
|
if (channel.isSpoilerChannel()) {
|
|
let ignoreTraits19;
|
|
if (ignoreTraits != null) {
|
|
ignoreTraits19 = ignoreTraits.ignoreTraits;
|
|
}
|
|
if (!ignoreTraits19) {
|
|
let VoiceNormalIcon = tmp(4780).VoiceNormalSpoilerIcon;
|
|
}
|
|
}
|
|
VoiceNormalIcon = tmp(4781).VoiceNormalIcon;
|
|
}
|
|
return VoiceLockIcon;
|
|
} else if (tmp6.GUILD_DIRECTORY === type) {
|
|
return tmp(4782).HubIcon;
|
|
}
|
|
}
|
|
}
|
|
return tmp(4754).ThreadIcon;
|
|
}
|
|
}
|
|
const obj2 = require(4742) /* shouldShowMembershipVerificationGate */;
|
|
}
|
|
let result = require("mergeGuildAvatar").fileFinishedImporting("utils/native/ChannelUtils.tsx");
|
|
|
|
export const getThreadChannelIcon = function getThreadChannelIcon(arg0) {
|
|
if (ChannelTypes.PRIVATE_THREAD === arg0) {
|
|
return importDefault(4717);
|
|
} else {
|
|
if (tmp.ANNOUNCEMENT_THREAD !== arg0) {
|
|
if (tmp.PUBLIC_THREAD !== arg0) {
|
|
return null;
|
|
}
|
|
}
|
|
return importDefault(4718);
|
|
}
|
|
};
|
|
export const getSimpleChannelIcon = function getSimpleChannelIcon(channel) {
|
|
const type = channel.type;
|
|
if (ChannelTypes.PRIVATE_THREAD === type) {
|
|
let tmp2 = importDefault(4717);
|
|
} else if (tmp.ANNOUNCEMENT_THREAD === type) {
|
|
tmp2 = importDefault(4718);
|
|
} 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(4719);
|
|
} else {
|
|
if (tmp.GUILD_TEXT !== type3) {
|
|
if (tmp.GUILD_FORUM !== type3) {
|
|
if (tmp.GUILD_MEDIA !== type3) {
|
|
if (tmp.GROUP_DM === type3) {
|
|
return importDefault(4721);
|
|
} else if (tmp.DM === type3) {
|
|
return importDefault(4722);
|
|
} else if (tmp.GUILD_ANNOUNCEMENT === type3) {
|
|
return importDefault(4723);
|
|
} else if (tmp.GUILD_STAGE_VOICE === type3) {
|
|
return importDefault(4724);
|
|
} else if (tmp.GUILD_VOICE === type3) {
|
|
return importDefault(4725);
|
|
} else if (tmp.GUILD_DIRECTORY === type3) {
|
|
return importDefault(4726);
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return importDefault(4720);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const type2 = channel.type;
|
|
if (tmp.PRIVATE_THREAD === type2) {
|
|
let tmp23 = importDefault(4717);
|
|
} else if (tmp.ANNOUNCEMENT_THREAD === type2) {
|
|
tmp23 = importDefault(4718);
|
|
} 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) {
|
|
|
|
};
|
|
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(4755) /* FolderIcon */.FolderIcon;
|
|
} else if (tmp.GUILD_TEXT === type) {
|
|
return require(4761) /* TextIcon */.TextIcon;
|
|
} else if (tmp.GUILD_FORUM === type) {
|
|
return require(4768) /* ForumIcon */.ForumIcon;
|
|
} else if (tmp.GUILD_MEDIA === type) {
|
|
return require(4767) /* ImageIcon */.ImageIcon;
|
|
} else if (tmp.GROUP_DM === type) {
|
|
return require(4769) /* GroupIcon */.GroupIcon;
|
|
} else if (tmp.DM === type) {
|
|
return require(4770) /* AtIcon */.AtIcon;
|
|
} else if (tmp.GUILD_ANNOUNCEMENT === type) {
|
|
return require(4774) /* AnnouncementsIcon */.AnnouncementsIcon;
|
|
} else if (tmp.GUILD_STAGE_VOICE === type) {
|
|
return require(4777) /* StageIcon */.StageIcon;
|
|
} else if (tmp.GUILD_VOICE === type) {
|
|
return require(4781) /* VoiceNormalIcon */.VoiceNormalIcon;
|
|
} else if (tmp.GUILD_DIRECTORY === type) {
|
|
return require(4782) /* HubIcon */.HubIcon;
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (channel.isForumPost()) {
|
|
let ThreadIcon = tmp23(4752).ChatIcon;
|
|
} else {
|
|
ThreadIcon = tmp23(4754).ThreadIcon;
|
|
}
|
|
return ThreadIcon;
|
|
};
|