decord/source/modules/guild_sidebar/native/ChannelBadge.tsx

60 lines
2.4 KiB
TypeScript
Raw Normal View History

// Module ID: 16359
// Function ID: 16360
2026-07-20 16:05:17 +00:00
// Name: ChannelBadge
// Dependencies: [19, 17, 2026, 21, 4638, 563, 16360, 12439, 4634, 1881, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 16359 (ChannelBadge)
import useStateFromStores from "useStateFromStores" /* 563 */;
import NewBadgeDefault from "NewBadge" /* 12439 */;
import MentionsBadgeDefault from "MentionsBadge" /* 16360 */;
import noop from "module_19" /* 19 */;
import LocaleStore from "LocaleStore" /* 2026 */;
2026-07-23 10:11:24 +00:00
require = fn;
const View = fn(17).View;
const jsx = fn(21).jsx;
const createStyles = fn(4638);
let closure_6 = createStyles.createStyles(() => ({ channelInfoContainer: { paddingStart: 4 } }));
const size = fn(2);
const result = size.fileFinishedImporting("modules/guild_sidebar/native/ChannelBadge.tsx");
2026-07-20 16:05:17 +00:00
export default function ChannelBadge(arg0) {
({ mentionCount, postsWithUnreadsCount, muted } = arg0);
({ isMentionLowImportance, isNewChannel } = arg0);
const tmp = closure_6();
const items = [LocaleStore];
const stateFromStores = useStateFromStores.useStateFromStores(items, () => locale.locale);
2026-07-20 16:05:17 +00:00
if (null != mentionCount) {
if (mentionCount > 0) {
const obj2 = { style: tmp.channelInfoContainer, children: null };
const obj3 = { mentionsCount: mentionCount, isMentionLowImportance };
obj2.children = jsx(MentionsBadgeDefault, { mentionsCount: mentionCount, isMentionLowImportance });
let tmp5 = <View style={tmp.channelInfoContainer}>{null}</View>;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp5;
2026-07-20 16:05:17 +00:00
}
if (isNewChannel) {
const obj4 = { style: tmp.channelInfoContainer, children: jsx(NewBadgeDefault, {}) };
tmp5 = <View style={tmp.channelInfoContainer}>{jsx(NewBadgeDefault, {})}</View>;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp5 = null;
2026-07-20 16:05:17 +00:00
if (null != muted) {
2026-07-29 08:29:29 +00:00
tmp5 = null;
2026-07-20 16:05:17 +00:00
if (!muted) {
2026-07-29 08:29:29 +00:00
tmp5 = null;
2026-07-20 16:05:17 +00:00
if (null != postsWithUnreadsCount) {
2026-07-29 08:29:29 +00:00
tmp5 = null;
2026-07-20 16:05:17 +00:00
if (postsWithUnreadsCount > 0) {
const obj5 = { style: tmp.channelInfoContainer, children: null };
const obj6 = { variant: "text-xs/semibold", color: "text-muted", children: tmp2(1881).humanizeValue(postsWithUnreadsCount, stateFromStores) };
obj5.children = jsx(tmp2(4634).Text, { variant: "text-xs/semibold", color: "text-muted", children: tmp2(1881).humanizeValue(postsWithUnreadsCount, stateFromStores) });
tmp5 = <View style={tmp.channelInfoContainer}>{null}</View>;
const tmp2Result = tmp2(1881);
2026-07-20 16:05:17 +00:00
}
}
}
}
}
};