decord/source/utils/native/ChannelUtils.tsx

638 lines
27 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 4628
// Function ID: 40382
2026-07-20 16:05:17 +00:00
// Name: getThreadChannelIcon
2026-07-28 08:39:19 +00:00
// Dependencies: [1918, 1838, 1850, 653, 4629, 4630, 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 2]
2026-07-20 16:05:17 +00:00
// Exports: getChannelIconComponentWithGuild, getChannelIconWithGuild, getChannelMentionIcon, getSimpleChannelIcon, getSimpleChannelIconComponent
2026-07-28 08:39:19 +00:00
// Module 4628 (getThreadChannelIcon)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import closure_5 from "_isNativeReflectConstruct";
import { ChannelTypes } from "ME";
const require = arg1;
2026-07-20 16:05:17 +00:00
function getThreadChannelIcon(type) {
if (ChannelTypes.PRIVATE_THREAD === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4629);
2026-07-20 16:05:17 +00:00
} else {
if (ChannelTypes.ANNOUNCEMENT_THREAD !== type) {
if (ChannelTypes.PUBLIC_THREAD !== type) {
return null;
}
}
2026-07-28 08:39:19 +00:00
return importDefault(4630);
2026-07-20 16:05:17 +00:00
}
}
function getChannelIcon(guild_id, ignoreTraits) {
let isRulesChannel;
let locked;
let obj = ignoreTraits;
if (null == ignoreTraits) {
obj = {};
}
({ isRulesChannel, locked } = obj);
2026-07-23 10:11:24 +00:00
const items = [_createForOfIteratorHelperLoose, closure_5, _isNativeReflectConstruct];
2026-07-28 08:39:19 +00:00
let result = require(4654) /* shouldShowMembershipVerificationGate */.shouldShowMembershipVerificationGate(guild_id.guild_id, items);
2026-07-20 16:05:17 +00:00
if (guild_id.isForumPost()) {
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
return importDefault(4647);
2026-07-20 16:05:17 +00:00
} else {
const tmp3 = getThreadChannelIcon(guild_id.type);
if (null != tmp3) {
return tmp3;
} else {
result = guild_id.isMediaChannel();
result = guild_id.isNSFW();
const type = guild_id.type;
result = ChannelTypes;
if (ChannelTypes.PRIVATE_THREAD !== type) {
result = ChannelTypes;
if (ChannelTypes.ANNOUNCEMENT_THREAD !== type) {
result = ChannelTypes;
if (ChannelTypes.PUBLIC_THREAD !== type) {
result = ChannelTypes;
if (ChannelTypes.GUILD_CATEGORY === type) {
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
return importDefault(4631);
2026-07-20 16:05:17 +00:00
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_TEXT === type) {
if (isRulesChannel) {
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
result = importDefault(4657);
2026-07-20 16:05:17 +00:00
} else {
if (result) {
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
result = importDefault(4643);
2026-07-20 16:05:17 +00:00
}
if (guild_id.isSpoilerChannel()) {
if (null == ignoreTraits) {
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
result = importDefault(4644);
2026-07-20 16:05:17 +00:00
}
}
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(guild_id)) {
2026-07-20 16:05:17 +00:00
if (null == ignoreTraits) {
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
result = importDefault(4653);
2026-07-20 16:05:17 +00:00
}
}
if (null != guild_id.linkedLobby) {
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
result = importDefault(4659);
2026-07-20 16:05:17 +00:00
} else {
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
result = importDefault(4632);
2026-07-20 16:05:17 +00:00
}
}
return result;
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_FORUM === type) {
if (isRulesChannel) {
result = importDefault;
result = dependencyMap;
2026-07-28 08:39:19 +00:00
let tmp83Result = importDefault(4657);
2026-07-20 16:05:17 +00:00
} else {
if (result) {
if (result) {
2026-07-28 08:39:19 +00:00
let tmp85 = 4652;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
tmp85 = 4649;
2026-07-20 16:05:17 +00:00
}
tmp83Result = importDefault(tmp85);
const tmp83 = importDefault;
}
if (guild_id.isSpoilerChannel()) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
importDefault(4650);
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(guild_id)) {
2026-07-20 16:05:17 +00:00
if (null == ignoreTraits) {
if (result) {
2026-07-28 08:39:19 +00:00
let tmp93 = 4660;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
tmp93 = 4661;
2026-07-20 16:05:17 +00:00
}
importDefault(tmp93);
const tmp91 = importDefault;
}
}
if (result) {
2026-07-28 08:39:19 +00:00
let tmp96 = 4651;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
tmp96 = 4648;
2026-07-20 16:05:17 +00:00
}
importDefault(tmp96);
const tmp94 = importDefault;
}
return tmp83Result;
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_MEDIA === type) {
if (isRulesChannel) {
2026-07-28 08:39:19 +00:00
let tmp69 = importDefault(4657);
2026-07-20 16:05:17 +00:00
} else {
if (result) {
2026-07-28 08:39:19 +00:00
tmp69 = importDefault(4652);
2026-07-20 16:05:17 +00:00
}
if (guild_id.isSpoilerChannel()) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
importDefault(4650);
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (!importDefault(4658)(guild_id)) {
let tmp76 = importDefault(4651);
2026-07-20 16:05:17 +00:00
} else if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
tmp76 = importDefault(4660);
2026-07-20 16:05:17 +00:00
}
}
return tmp69;
} else {
result = ChannelTypes;
if (ChannelTypes.GROUP_DM === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4633);
2026-07-20 16:05:17 +00:00
} else {
result = ChannelTypes;
if (ChannelTypes.DM === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4634);
2026-07-20 16:05:17 +00:00
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_ANNOUNCEMENT === type) {
if (isRulesChannel) {
2026-07-28 08:39:19 +00:00
let tmp49 = importDefault(4657);
2026-07-20 16:05:17 +00:00
} else {
if (result) {
2026-07-28 08:39:19 +00:00
tmp49 = importDefault(4645);
2026-07-20 16:05:17 +00:00
}
if (guild_id.isSpoilerChannel()) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
importDefault(4646);
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (!importDefault(4658)(guild_id)) {
let tmp56 = importDefault(4635);
2026-07-20 16:05:17 +00:00
} else if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
tmp56 = importDefault(4662);
2026-07-20 16:05:17 +00:00
}
}
return tmp49;
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_STAGE_VOICE === type) {
if (result) {
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(guild_id)) {
let tmp33Result = tmp33(4663);
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
tmp33Result = tmp33(4642);
2026-07-20 16:05:17 +00:00
}
return tmp33Result;
}
if (locked) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
importDefault(4663);
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (!importDefault(4658)(guild_id)) {
let tmp42 = importDefault(4636);
2026-07-20 16:05:17 +00:00
} else if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
tmp42 = importDefault(4642);
2026-07-20 16:05:17 +00:00
}
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_VOICE === type) {
if (obj.textFocused) {
2026-07-28 08:39:19 +00:00
let tmp9Result = importDefault(4647);
2026-07-20 16:05:17 +00:00
} else {
if (result) {
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(guild_id)) {
tmp9Result = tmp9(4663);
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
tmp9Result = tmp9(4639);
2026-07-20 16:05:17 +00:00
}
}
if (locked) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
importDefault(4663);
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(guild_id)) {
2026-07-20 16:05:17 +00:00
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
importDefault(4639);
2026-07-20 16:05:17 +00:00
}
}
if (result) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
importDefault(4640);
2026-07-20 16:05:17 +00:00
}
}
if (!guild_id.isSpoilerChannel()) {
2026-07-28 08:39:19 +00:00
let tmp22 = importDefault(4637);
2026-07-20 16:05:17 +00:00
} else if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
tmp22 = importDefault(4641);
2026-07-20 16:05:17 +00:00
}
}
return tmp9Result;
} else if (ChannelTypes.GUILD_DIRECTORY === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4638);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
}
}
}
}
}
}
}
}
}
}
}
result = getThreadChannelIcon;
return getThreadChannelIcon(guild_id.type);
}
}
2026-07-28 08:39:19 +00:00
const obj2 = require(4654) /* shouldShowMembershipVerificationGate */;
2026-07-20 16:05:17 +00:00
}
function getChannelIconComponent(channel, ignoreTraits) {
let isRulesChannel;
let locked;
let obj = ignoreTraits;
if (null == ignoreTraits) {
obj = {};
}
({ isRulesChannel, locked } = obj);
2026-07-23 10:11:24 +00:00
const items = [_createForOfIteratorHelperLoose, closure_5, _isNativeReflectConstruct];
2026-07-28 08:39:19 +00:00
let result = require(4654) /* shouldShowMembershipVerificationGate */.shouldShowMembershipVerificationGate(channel.guild_id, items);
2026-07-20 16:05:17 +00:00
if (channel.isForumPost()) {
2026-07-23 10:11:24 +00:00
result = require;
2026-07-20 16:05:17 +00:00
result = dependencyMap;
2026-07-28 08:39:19 +00:00
return require(4664) /* ChatIcon */.ChatIcon;
2026-07-20 16:05:17 +00:00
} else {
const isMediaChannelResult = channel.isMediaChannel();
const isNSFWResult = channel.isNSFW();
const type = channel.type;
if (ChannelTypes.PRIVATE_THREAD === type) {
2026-07-23 10:11:24 +00:00
result = require;
2026-07-20 16:05:17 +00:00
result = dependencyMap;
2026-07-28 08:39:19 +00:00
return require(4665) /* ThreadLockIcon */.ThreadLockIcon;
2026-07-20 16:05:17 +00:00
} else {
result = ChannelTypes;
if (ChannelTypes.ANNOUNCEMENT_THREAD !== type) {
result = ChannelTypes;
if (ChannelTypes.PUBLIC_THREAD !== type) {
result = ChannelTypes;
if (ChannelTypes.GUILD_CATEGORY === type) {
result = dependencyMap;
2026-07-28 08:39:19 +00:00
return require(4667) /* FolderIcon */.FolderIcon;
2026-07-20 16:05:17 +00:00
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_TEXT === type) {
if (isRulesChannel) {
2026-07-28 08:39:19 +00:00
let TextWarningIcon = require(4668) /* BookCheckIcon */.BookCheckIcon;
2026-07-20 16:05:17 +00:00
} else {
if (isNSFWResult) {
2026-07-28 08:39:19 +00:00
TextWarningIcon = require(4669) /* TextWarningIcon */.TextWarningIcon;
2026-07-20 16:05:17 +00:00
}
if (channel.isSpoilerChannel()) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
const TextSpoilerIcon = require(4670) /* TextSpoilerIcon */.TextSpoilerIcon;
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(channel)) {
2026-07-20 16:05:17 +00:00
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
const TextLockIcon = require(4671) /* TextLockIcon */.TextLockIcon;
2026-07-20 16:05:17 +00:00
}
}
if (null != channel.linkedLobby) {
2026-07-28 08:39:19 +00:00
let TextIcon = require(4672) /* TextControllerIcon */.TextControllerIcon;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
TextIcon = require(4673) /* TextIcon */.TextIcon;
2026-07-20 16:05:17 +00:00
}
}
return TextWarningIcon;
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_FORUM === type) {
if (isRulesChannel) {
2026-07-28 08:39:19 +00:00
let ForumWarningIcon = require(4668) /* BookCheckIcon */.BookCheckIcon;
2026-07-20 16:05:17 +00:00
} else {
if (isNSFWResult) {
if (isMediaChannelResult) {
2026-07-28 08:39:19 +00:00
ForumWarningIcon = tmp70(4674).ImageWarningIcon;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
ForumWarningIcon = tmp70(4675).ForumWarningIcon;
2026-07-20 16:05:17 +00:00
}
}
if (channel.isSpoilerChannel()) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
const ForumSpoilerIcon2 = require(4676) /* ForumSpoilerIcon */.ForumSpoilerIcon;
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(channel)) {
2026-07-20 16:05:17 +00:00
if (null == ignoreTraits) {
if (isMediaChannelResult) {
2026-07-28 08:39:19 +00:00
let ForumLockIcon = tmp76(4677).ImageLockIcon;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
ForumLockIcon = tmp76(4678).ForumLockIcon;
2026-07-20 16:05:17 +00:00
}
}
}
if (isMediaChannelResult) {
2026-07-28 08:39:19 +00:00
let ForumIcon = tmp78(4679).ImageIcon;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
ForumIcon = tmp78(4680).ForumIcon;
2026-07-20 16:05:17 +00:00
}
}
return ForumWarningIcon;
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_MEDIA === type) {
if (isRulesChannel) {
2026-07-28 08:39:19 +00:00
let ImageWarningIcon = require(4668) /* BookCheckIcon */.BookCheckIcon;
2026-07-20 16:05:17 +00:00
} else {
if (isNSFWResult) {
2026-07-28 08:39:19 +00:00
ImageWarningIcon = require(4674) /* ImageWarningIcon */.ImageWarningIcon;
2026-07-20 16:05:17 +00:00
}
if (channel.isSpoilerChannel()) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
const ForumSpoilerIcon = require(4676) /* ForumSpoilerIcon */.ForumSpoilerIcon;
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (!importDefault(4658)(channel)) {
let ImageLockIcon = require(4679) /* ImageIcon */.ImageIcon;
2026-07-20 16:05:17 +00:00
} else if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
ImageLockIcon = require(4677) /* ImageLockIcon */.ImageLockIcon;
2026-07-20 16:05:17 +00:00
}
}
return ImageWarningIcon;
} else {
result = ChannelTypes;
if (ChannelTypes.GROUP_DM === type) {
2026-07-28 08:39:19 +00:00
return require(4681) /* GroupIcon */.GroupIcon;
2026-07-20 16:05:17 +00:00
} else {
result = ChannelTypes;
if (ChannelTypes.DM === type) {
2026-07-28 08:39:19 +00:00
return require(4682) /* AtIcon */.AtIcon;
2026-07-20 16:05:17 +00:00
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_ANNOUNCEMENT === type) {
if (isRulesChannel) {
2026-07-28 08:39:19 +00:00
let AnnouncementsWarningIcon = require(4668) /* BookCheckIcon */.BookCheckIcon;
2026-07-20 16:05:17 +00:00
} else {
if (isNSFWResult) {
2026-07-28 08:39:19 +00:00
AnnouncementsWarningIcon = require(4683) /* AnnouncementsWarningIcon */.AnnouncementsWarningIcon;
2026-07-20 16:05:17 +00:00
}
if (channel.isSpoilerChannel()) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
const AnnouncementsSpoilerIcon = require(4684) /* AnnouncementsSpoilerIcon */.AnnouncementsSpoilerIcon;
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (!importDefault(4658)(channel)) {
let AnnouncementsLockIcon = require(4686) /* AnnouncementsIcon */.AnnouncementsIcon;
2026-07-20 16:05:17 +00:00
} else if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
AnnouncementsLockIcon = require(4685) /* AnnouncementsLockIcon */.AnnouncementsLockIcon;
2026-07-20 16:05:17 +00:00
}
}
return AnnouncementsWarningIcon;
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_STAGE_VOICE === type) {
if (result) {
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(channel)) {
let StageLockIcon = tmp29(4687).LockIcon;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
StageLockIcon = tmp29(4688).StageLockIcon;
2026-07-20 16:05:17 +00:00
}
return StageLockIcon;
}
if (locked) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
const LockIcon2 = require(4687) /* LockIcon */.LockIcon;
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (!importDefault(4658)(channel)) {
let StageLockIcon2 = require(4689) /* StageIcon */.StageIcon;
2026-07-20 16:05:17 +00:00
} else if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
StageLockIcon2 = require(4688) /* StageLockIcon */.StageLockIcon;
2026-07-20 16:05:17 +00:00
}
} else {
result = ChannelTypes;
if (ChannelTypes.GUILD_VOICE === type) {
if (obj.textFocused) {
2026-07-28 08:39:19 +00:00
let VoiceLockIcon = require(4664) /* ChatIcon */.ChatIcon;
2026-07-20 16:05:17 +00:00
} else {
if (result) {
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(channel)) {
VoiceLockIcon = tmp10(4687).LockIcon;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
VoiceLockIcon = tmp10(4690).VoiceLockIcon;
2026-07-20 16:05:17 +00:00
}
}
if (locked) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
const LockIcon = require(4687) /* LockIcon */.LockIcon;
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
if (importDefault(4658)(channel)) {
2026-07-20 16:05:17 +00:00
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
const VoiceLockIcon2 = require(4690) /* VoiceLockIcon */.VoiceLockIcon;
2026-07-20 16:05:17 +00:00
}
}
if (isNSFWResult) {
if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
const VoiceWarningIcon = require(4691) /* VoiceWarningIcon */.VoiceWarningIcon;
2026-07-20 16:05:17 +00:00
}
}
if (!channel.isSpoilerChannel()) {
2026-07-28 08:39:19 +00:00
let VoiceNormalSpoilerIcon = require(4693) /* VoiceNormalIcon */.VoiceNormalIcon;
2026-07-20 16:05:17 +00:00
} else if (null == ignoreTraits) {
2026-07-28 08:39:19 +00:00
VoiceNormalSpoilerIcon = require(4692) /* VoiceNormalSpoilerIcon */.VoiceNormalSpoilerIcon;
2026-07-20 16:05:17 +00:00
}
}
return VoiceLockIcon;
} else if (ChannelTypes.GUILD_DIRECTORY === type) {
2026-07-28 08:39:19 +00:00
return require(4694) /* HubIcon */.HubIcon;
2026-07-20 16:05:17 +00:00
}
}
}
}
}
}
}
}
}
}
}
2026-07-23 10:11:24 +00:00
result = require;
2026-07-20 16:05:17 +00:00
result = dependencyMap;
2026-07-28 08:39:19 +00:00
return require(4666) /* ThreadIcon */.ThreadIcon;
2026-07-20 16:05:17 +00:00
}
}
2026-07-28 08:39:19 +00:00
const obj2 = require(4654) /* shouldShowMembershipVerificationGate */;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let result = require("_isNativeReflectConstruct").fileFinishedImporting("utils/native/ChannelUtils.tsx");
2026-07-20 16:05:17 +00:00
export { getThreadChannelIcon };
export const getSimpleChannelIcon = function getSimpleChannelIcon(channel) {
const tmp = getThreadChannelIcon(channel.type);
if (null != tmp) {
return tmp;
} else {
const type = channel.type;
if (ChannelTypes.PRIVATE_THREAD !== type) {
if (ChannelTypes.ANNOUNCEMENT_THREAD !== type) {
if (ChannelTypes.PUBLIC_THREAD !== type) {
if (ChannelTypes.GUILD_CATEGORY === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4631);
2026-07-20 16:05:17 +00:00
} else {
if (ChannelTypes.GUILD_TEXT !== type) {
if (ChannelTypes.GUILD_FORUM !== type) {
if (ChannelTypes.GUILD_MEDIA !== type) {
if (ChannelTypes.GROUP_DM === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4633);
2026-07-25 08:10:48 +00:00
} else if (ChannelTypes.DM === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4634);
2026-07-25 08:10:48 +00:00
} else if (ChannelTypes.GUILD_ANNOUNCEMENT === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4635);
2026-07-25 08:10:48 +00:00
} else if (ChannelTypes.GUILD_STAGE_VOICE === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4636);
2026-07-25 08:10:48 +00:00
} else if (ChannelTypes.GUILD_VOICE === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4637);
2026-07-25 08:10:48 +00:00
} else if (ChannelTypes.GUILD_DIRECTORY === type) {
2026-07-28 08:39:19 +00:00
return importDefault(4638);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
}
}
}
2026-07-28 08:39:19 +00:00
return importDefault(4632);
2026-07-20 16:05:17 +00:00
}
}
}
}
return getThreadChannelIcon(channel.type);
}
};
export const getChannelIconWithGuild = function getChannelIconWithGuild(channel, guild) {
const obj = {};
let rulesChannelId;
if (null != guild) {
rulesChannelId = guild.rulesChannelId;
}
obj.isRulesChannel = rulesChannelId === channel.id;
return getChannelIcon(channel, obj);
};
export const getChannelMentionIcon = function getChannelMentionIcon(iconType) {
if ("voice" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4637);
2026-07-20 16:05:17 +00:00
} else if ("voice-locked" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4639);
2026-07-25 08:10:48 +00:00
} else if ("voice-nsfw" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4640);
2026-07-25 08:10:48 +00:00
} else if ("voice-spoiler" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4641);
2026-07-20 16:05:17 +00:00
} else if ("stage" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4636);
2026-07-20 16:05:17 +00:00
} else if ("stage-locked" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4642);
2026-07-20 16:05:17 +00:00
} else if ("text" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4632);
2026-07-20 16:05:17 +00:00
} else if ("text-nsfw" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4643);
2026-07-25 08:10:48 +00:00
} else if ("text-spoiler" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4644);
2026-07-20 16:05:17 +00:00
} else if ("announcement" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4635);
2026-07-20 16:05:17 +00:00
} else if ("announcement-nsfw" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4645);
2026-07-25 08:10:48 +00:00
} else if ("announcement-spoiler" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4646);
2026-07-20 16:05:17 +00:00
} else if ("thread" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4630);
2026-07-20 16:05:17 +00:00
} else {
if ("post" !== iconType) {
if ("message" !== iconType) {
if ("forum" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4648);
2026-07-25 08:10:48 +00:00
} else if ("forum-nsfw" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4649);
2026-07-25 08:10:48 +00:00
} else if ("forum-spoiler" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4650);
2026-07-25 08:10:48 +00:00
} else if ("media" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4651);
2026-07-25 08:10:48 +00:00
} else if ("media-nsfw" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4652);
2026-07-25 08:10:48 +00:00
} else if ("locked" === iconType) {
2026-07-28 08:39:19 +00:00
return importDefault(4653);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
}
}
2026-07-28 08:39:19 +00:00
return importDefault(4647);
2026-07-20 16:05:17 +00:00
}
};
export { getChannelIcon };
export const getChannelIconComponentWithGuild = function getChannelIconComponentWithGuild(channel, guild) {
const obj = {};
let rulesChannelId;
if (null != guild) {
rulesChannelId = guild.rulesChannelId;
}
obj.isRulesChannel = rulesChannelId === channel.id;
return getChannelIconComponent(channel, obj);
};
export { getChannelIconComponent };
export const getSimpleChannelIconComponent = function getSimpleChannelIconComponent(channel) {
const type = channel.type;
if (ChannelTypes.PRIVATE_THREAD !== type) {
if (ChannelTypes.ANNOUNCEMENT_THREAD !== type) {
if (ChannelTypes.PUBLIC_THREAD !== type) {
if (ChannelTypes.GUILD_CATEGORY === type) {
2026-07-28 08:39:19 +00:00
return require(4667) /* FolderIcon */.FolderIcon;
2026-07-20 16:05:17 +00:00
} else if (ChannelTypes.GUILD_TEXT === type) {
2026-07-28 08:39:19 +00:00
return require(4673) /* TextIcon */.TextIcon;
2026-07-20 16:05:17 +00:00
} else if (ChannelTypes.GUILD_FORUM === type) {
2026-07-28 08:39:19 +00:00
return require(4680) /* ForumIcon */.ForumIcon;
2026-07-20 16:05:17 +00:00
} else if (ChannelTypes.GUILD_MEDIA === type) {
2026-07-28 08:39:19 +00:00
return require(4679) /* ImageIcon */.ImageIcon;
2026-07-20 16:05:17 +00:00
} else if (ChannelTypes.GROUP_DM === type) {
2026-07-28 08:39:19 +00:00
return require(4681) /* GroupIcon */.GroupIcon;
2026-07-20 16:05:17 +00:00
} else if (ChannelTypes.DM === type) {
2026-07-28 08:39:19 +00:00
return require(4682) /* AtIcon */.AtIcon;
2026-07-20 16:05:17 +00:00
} else if (ChannelTypes.GUILD_ANNOUNCEMENT === type) {
2026-07-28 08:39:19 +00:00
return require(4686) /* AnnouncementsIcon */.AnnouncementsIcon;
2026-07-20 16:05:17 +00:00
} else if (ChannelTypes.GUILD_STAGE_VOICE === type) {
2026-07-28 08:39:19 +00:00
return require(4689) /* StageIcon */.StageIcon;
2026-07-20 16:05:17 +00:00
} else if (ChannelTypes.GUILD_VOICE === type) {
2026-07-28 08:39:19 +00:00
return require(4693) /* VoiceNormalIcon */.VoiceNormalIcon;
2026-07-20 16:05:17 +00:00
} else if (ChannelTypes.GUILD_DIRECTORY === type) {
2026-07-28 08:39:19 +00:00
return require(4694) /* HubIcon */.HubIcon;
2026-07-20 16:05:17 +00:00
} else {
return null;
}
}
}
}
if (channel.isForumPost()) {
2026-07-28 08:39:19 +00:00
let ThreadIcon = tmp24(4664).ChatIcon;
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
ThreadIcon = tmp24(4666).ThreadIcon;
2026-07-20 16:05:17 +00:00
}
return ThreadIcon;
};