decord/source/modules/premium/powerups/native/GuildPowerupsChannelRow.tsx

144 lines
5.5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 15575
// Function ID: 15576
2026-07-20 16:05:17 +00:00
// Name: GuildPowerupsChannelRowIndicator
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 17, 9950, 21, 12055, 7938, 712, 1297, 4380, 15529, 15371, 5823, 12051, 12070, 11948, 12039, 5854, 5821, 1236, 2369, 15576, 11858, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 15575 (GuildPowerupsChannelRowIndicator)
2026-08-24 06:08:38 +00:00
import ThemesDefault from "Themes" /* 712 */;
2026-08-25 06:04:03 +00:00
import add from "add" /* 5823 */;
import GUILD_POWERUP_NOTIFICATION_COOLDOWN from "GUILD_POWERUP_NOTIFICATION_COOLDOWN" /* 12055 */;
import SidebarCoachmarkOverlayLayer from "SidebarCoachmarkOverlayLayer" /* 15371 */;
import useGuildPowerupsCoachmarkDefault from "useGuildPowerupsCoachmark" /* 15529 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function GuildPowerupsChannelRowIndicator(indicator) {
indicator = indicator.indicator;
if (null == indicator) {
return null;
} else {
const type = indicator.type;
2026-08-24 06:08:38 +00:00
if (GUILD_POWERUP_NOTIFICATION_COOLDOWN.GuildPowerupNotificationIndicatorType.WARNING === type) {
2026-07-29 08:29:29 +00:00
let obj = { color: null, size: "sm" };
2026-08-24 06:08:38 +00:00
obj[0] = ThemesDefault.colors.STATUS_WARNING;
2026-08-25 06:04:03 +00:00
return callback(tmp4(7938).CircleErrorIcon, obj);
} else if (tmp4(12055).GuildPowerupNotificationIndicatorType.UNREAD === type) {
2026-07-29 08:29:29 +00:00
obj = { value: null, isMentionLowImportance: true };
obj[0] = indicator.count;
return callback(tmp4(1297).Badge, obj);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
}
}
function GuildPowerupsCoachmarkHost(arg0) {
({ targetRef, guildId, popout } = arg0);
2026-08-24 06:08:38 +00:00
useGuildPowerupsCoachmarkDefault(targetRef, guildId, popout);
2026-07-20 16:05:17 +00:00
return null;
}
function GuildPowerupsCoachmark(arg0) {
({ targetRef, guildId, popout } = arg0);
2026-08-24 06:08:38 +00:00
const context = React.useContext(SidebarCoachmarkOverlayLayer.SidebarCoachmarkOverlayContext);
2026-07-29 08:29:29 +00:00
const tmp5 = callback(GuildPowerupsCoachmarkHost, { targetRef, guildId, popout });
let tmp4Result = tmp5;
2026-07-20 16:05:17 +00:00
if (null != context) {
2026-07-29 08:29:29 +00:00
const obj = { value: null, children: null };
obj[0] = context;
obj[1] = tmp5;
2026-08-24 06:08:38 +00:00
tmp4Result = callback(add.LayerContext.Provider, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp4Result;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
createCacheKey = { container: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { marginVertical: require("hairlineWidth").CHANNEL_MARGIN_VERTICAL, marginHorizontal: 8, borderRadius: ThemesDefault.radii.md };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
let closure_8 = createCacheKey.createStyles(createCacheKey);
const result = require("set").fileFinishedImporting("modules/premium/powerups/native/GuildPowerupsChannelRow.tsx");
2026-07-20 16:05:17 +00:00
export default function GuildPowerupsChannelRow(guildId) {
guildId = guildId.guildId;
2026-07-23 10:11:24 +00:00
let dismissNewBadgeIfShown;
2026-07-29 08:29:29 +00:00
let obj = React;
2026-07-20 16:05:17 +00:00
const ref = React.useRef(null);
2026-08-25 06:04:03 +00:00
const tmp5 = dismissNewBadgeIfShown(12051)(guildId);
2026-07-20 16:05:17 +00:00
let indicator;
2026-08-24 06:08:38 +00:00
const tmp = callback2();
2026-07-29 08:29:29 +00:00
if (tmp5 != null) {
indicator = tmp5.indicator;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp8 = null != indicator;
if (!tmp8) {
2026-07-20 16:05:17 +00:00
let popout;
2026-07-29 08:29:29 +00:00
if (tmp5 != null) {
popout = tmp5.popout;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp8 = null != popout;
2026-07-20 16:05:17 +00:00
}
2026-08-25 06:04:03 +00:00
const tmp6Result = dismissNewBadgeIfShown(12070)(guildId, tmp8);
2026-07-29 08:29:29 +00:00
dismissNewBadgeIfShown = tmp6Result.dismissNewBadgeIfShown;
2026-07-20 16:05:17 +00:00
let showUnread;
2026-07-29 08:29:29 +00:00
if (tmp5 != null) {
showUnread = tmp5.showUnread;
}
2026-08-25 06:04:03 +00:00
const ChannelModes = guildId(11948).ChannelModes;
2026-07-29 08:29:29 +00:00
if (true === showUnread) {
let DEFAULT = ChannelModes.UNREAD_IMPORTANT;
let tmp14 = tmp13;
} else {
DEFAULT = ChannelModes.DEFAULT;
tmp14 = tmp13;
2026-07-20 16:05:17 +00:00
}
const items = [guildId, dismissNewBadgeIfShown];
2026-07-29 08:29:29 +00:00
const callback = obj.useCallback(() => {
2026-07-20 16:05:17 +00:00
dismissNewBadgeIfShown();
2026-08-24 06:08:38 +00:00
const obj = { guildId, analyticsLocation: dismissNewBadgeIfShown(closure_1_2[16]).GUILD_POWERUPS_CHANNEL_LIST_ROW };
dismissNewBadgeIfShown(closure_1_2[15])(obj);
2026-07-20 16:05:17 +00:00
}, items);
2026-08-04 08:36:32 +00:00
obj = { ref, collapsable: false, children: null };
obj = { targetRef: ref, guildId, popout: null };
let popout1;
2026-07-29 08:29:29 +00:00
if (tmp5 != null) {
popout1 = tmp5.popout;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = popout1;
const items1 = [closure_5(GuildPowerupsCoachmark, obj), ];
2026-08-24 06:08:38 +00:00
obj1 = { onPress: callback, style: tmp.container, accessible: true, mode: DEFAULT, unread: true === showUnread, accessibilityLabel: null, accessibilityState: null, name: null, icon: null, channelInfo: null };
2026-08-04 08:36:32 +00:00
const tmp17 = closure_6;
const tmp18 = View;
2026-07-29 08:29:29 +00:00
const tmp19 = GuildPowerupsCoachmark;
2026-08-25 06:04:03 +00:00
const tmp6 = dismissNewBadgeIfShown(12070);
2026-07-29 08:29:29 +00:00
const intl = tmp14(1236).intl;
2026-08-25 06:04:03 +00:00
obj1[5] = intl.string(dismissNewBadgeIfShown(2369).yv3DJJ);
2026-07-29 08:29:29 +00:00
obj1[6] = { selected: false };
const obj2 = { name: null, mode: null };
const intl2 = tmp14(1236).intl;
2026-08-25 06:04:03 +00:00
obj2[0] = intl2.string(dismissNewBadgeIfShown(2369).yv3DJJ);
2026-07-29 08:29:29 +00:00
obj2[1] = DEFAULT;
2026-08-25 06:04:03 +00:00
obj1[7] = closure_5(tmp14(11948).BaseChannelName, obj2);
const tmp3Result = dismissNewBadgeIfShown(11948);
obj1[8] = closure_5(tmp14(11948).BaseChannelIcon, { mode: DEFAULT, IconComponent: tmp14(15576).BoostTier2Icon });
2026-07-29 08:29:29 +00:00
if (tmp6Result.showNewBadgeOnRow) {
2026-08-25 06:04:03 +00:00
let tmp16Result = tmp16(tmp14(11858).NewBadge, {});
2026-07-20 16:05:17 +00:00
} else {
let indicator1;
2026-07-29 08:29:29 +00:00
if (tmp5 != null) {
indicator1 = tmp5.indicator;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj4 = { indicator: null };
obj4[0] = indicator1;
2026-08-04 08:36:32 +00:00
tmp16Result = tmp16(GuildPowerupsChannelRowIndicator, obj4);
2026-07-29 08:29:29 +00:00
const tmp22 = GuildPowerupsChannelRowIndicator;
2026-07-20 16:05:17 +00:00
}
2026-08-04 08:36:32 +00:00
const obj5 = { zIndex: 1, children: null };
obj1[9] = tmp16Result;
2026-08-24 06:08:38 +00:00
items1[1] = closure_5(tmp3Result, obj1);
2026-07-29 08:29:29 +00:00
obj[2] = items1;
2026-08-04 08:36:32 +00:00
obj5[1] = tmp17(tmp18, obj);
2026-08-25 06:04:03 +00:00
return closure_5(tmp14(5821).LayerScope, obj5);
2026-07-20 16:05:17 +00:00
};