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

152 lines
6.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11797
// Function ID: 11798
2026-07-20 16:05:17 +00:00
// Name: GuildPowerupsRecentActivityRow
2026-08-24 06:08:38 +00:00
// Dependencies: [17, 4669, 21, 4668, 712, 8347, 11798, 4066, 589, 8226, 8018, 11800, 11802, 1297, 4739, 11804, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 11797 (GuildPowerupsRecentActivityRow)
import set from "set" /* 2 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import initialize from "initialize" /* 589 */;
import ThemesDefault from "Themes" /* 712 */;
import resetCache from "resetCache" /* 4066 */;
import apexExperiment from "apexExperiment" /* 8347 */;
import useMaybeGetSortedBoosts from "useMaybeGetSortedBoosts" /* 11798 */;
import useMaybeGetSortedBoostsDefault from "useMaybeGetSortedBoosts" /* 11798 */;
import getBoostRowMessageTextDefault from "getBoostRowMessageText" /* 11804 */;
import closure_4 from "maybeApplyNoTextColorForLightCustomTheme" /* 4669 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function GuildPowerupsRecentActivityRow(row) {
row = row.row;
2026-08-24 06:08:38 +00:00
let obj = apexExperiment;
2026-08-12 06:57:52 +00:00
const manaTypeConsolidationExperiment = obj.useManaTypeConsolidationExperiment("GuildPowerupsRecentActivityRow");
2026-07-20 16:05:17 +00:00
({ boost, phase, sortKey } = row);
2026-08-12 06:57:52 +00:00
const tmp4 = callback();
2026-08-24 06:08:38 +00:00
obj1 = useMaybeGetSortedBoosts;
2026-08-12 06:57:52 +00:00
const getBoostUserConfig = obj1.useGetBoostUserConfig(boost);
2026-07-29 08:29:29 +00:00
({ roleColor, roleColorStrings, username } = getBoostUserConfig);
2026-08-24 06:08:38 +00:00
let obj2 = resetCache;
2026-08-04 21:03:28 +00:00
const date = new Date(sortKey);
2026-08-24 06:08:38 +00:00
let obj3 = initialize;
const items = [closure_4];
2026-08-12 06:57:52 +00:00
const stateFromStores = obj3.useStateFromStores(items, () => roleStyle.roleStyle);
2026-07-20 16:05:17 +00:00
if ("username" === stateFromStores) {
if (null != roleColor) {
2026-07-29 08:29:29 +00:00
obj = { color: null };
obj[0] = roleColor;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
let tmpResult = tmp(8226);
2026-08-12 06:57:52 +00:00
const processColorStringsArray = tmpResult.useProcessColorStringsArray(roleColorStrings);
2026-08-24 06:08:38 +00:00
tmpResult = tmp(8226);
2026-08-12 06:57:52 +00:00
const isRoleStyleAndRoleColorsEligibleForERC = tmpResult.useIsRoleStyleAndRoleColorsEligibleForERC(boost.guildId, boost.userId, stateFromStores, processColorStringsArray);
2026-07-20 16:05:17 +00:00
if ("gave" === phase) {
2026-08-24 06:08:38 +00:00
let BoostGemSlashIcon = tmp(8018).BoostGemIcon;
2026-07-20 16:05:17 +00:00
} else if ("expiring" === phase) {
2026-08-24 06:08:38 +00:00
BoostGemSlashIcon = tmp(11800).BoostTier1Icon;
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
BoostGemSlashIcon = tmp(11802).BoostGemSlashIcon;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
2026-08-12 06:57:52 +00:00
obj[0] = tmp4.boostRowContainer;
2026-07-20 16:05:17 +00:00
if ("gave" === phase) {
2026-08-04 21:03:28 +00:00
obj1 = { color: null, size: "sm" };
2026-08-24 06:08:38 +00:00
obj1[0] = ThemesDefault.unsafe_rawColors.GUILD_BOOSTING_PINK;
2026-08-04 21:03:28 +00:00
obj2 = obj1;
2026-07-20 16:05:17 +00:00
} else {
obj2 = { size: "sm" };
}
2026-07-29 08:29:29 +00:00
const items1 = [closure_5(BoostGemSlashIcon, obj2), , ];
2026-08-12 06:57:52 +00:00
obj3 = { style: null, children: null };
obj3[0] = tmp4.boostMessage;
let tmp19Result = "dot" === stateFromStores;
if (tmp19Result) {
tmp19Result = null != roleColor;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
if (tmp19Result) {
2026-07-29 08:29:29 +00:00
const obj4 = { size: "small", color: null, colors: null };
obj4[1] = roleColor;
obj4[2] = roleColorStrings;
2026-08-12 06:57:52 +00:00
tmp19Result = tmp19(tmp(1297).RoleDot, obj4);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
const items2 = [tmp19Result, , , ];
2026-07-29 08:29:29 +00:00
const obj5 = { variant: "text-md/medium", color: "interactive-text-active", lineClamp: 1, style: null, gradientColors: null, children: null };
2026-08-12 06:57:52 +00:00
const items3 = [tmp4.username, {}];
2026-07-29 08:29:29 +00:00
obj5[3] = items3;
2026-08-12 06:57:52 +00:00
let tmp23;
2026-07-20 16:05:17 +00:00
if (isRoleStyleAndRoleColorsEligibleForERC) {
2026-08-12 06:57:52 +00:00
tmp23 = processColorStringsArray;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
obj5[4] = tmp23;
2026-07-29 08:29:29 +00:00
obj5[5] = username;
2026-08-24 06:08:38 +00:00
items2[1] = closure_5(tmp(4739).Text, obj5);
items2[2] = closure_5(tmp(4739).Text, { variant: "text-md/medium", color: "interactive-text-active", children: " " });
2026-07-29 08:29:29 +00:00
const obj6 = { variant: "text-md/medium", lineClamp: 1, style: null, children: null };
2026-08-12 06:57:52 +00:00
obj6[2] = tmp4.messageText;
2026-08-24 06:08:38 +00:00
obj6[3] = getBoostRowMessageTextDefault(row);
items2[3] = closure_5(tmp(4739).Text, obj6);
2026-07-29 08:29:29 +00:00
obj3[1] = items2;
2026-07-20 16:05:17 +00:00
items1[1] = closure_6(View, obj3);
2026-08-12 06:57:52 +00:00
let str4 = "text-xs/semibold";
if (manaTypeConsolidationExperiment) {
str4 = "text-xs/medium";
}
const obj7 = { variant: null, color: null, style: null, children: null };
obj7[0] = str4;
let str5;
if (manaTypeConsolidationExperiment) {
str5 = "text-subtle";
}
obj7[1] = str5;
obj7[2] = tmp4.timestamp;
obj7[3] = calendarFormatResult;
2026-08-24 06:08:38 +00:00
items1[2] = closure_5(tmp(4739).Text, obj7);
2026-07-29 08:29:29 +00:00
obj[1] = items1;
2026-07-20 16:05:17 +00:00
return closure_6(View, obj);
}
}
2026-08-24 06:08:38 +00:00
const View = get_ActivityIndicator.View;
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
let obj = { sectionContainer: null, boostContainer: null, boostRowContainer: null, boostMessage: null, username: null, messageText: null, timestamp: null };
2026-08-24 06:08:38 +00:00
obj = { marginTop: ThemesDefault.space.PX_16, paddingHorizontal: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-08-24 06:08:38 +00:00
obj[1] = { gap: ThemesDefault.space.PX_12, marginTop: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
obj[2] = { flexDirection: "row", alignItems: "center", gap: 8 };
obj[3] = { flex: 1, flexDirection: "row", alignItems: "center" };
obj[4] = { maxWidth: 170, flexShrink: 1 };
obj[5] = { flexShrink: 0 };
obj[6] = { flexShrink: 0 };
let closure_7 = createCacheKey.createStyles(obj);
2026-08-24 06:08:38 +00:00
let obj1 = { gap: ThemesDefault.space.PX_12, marginTop: ThemesDefault.space.PX_16 };
const result = set.fileFinishedImporting("modules/premium/powerups/native/GuildPowerupsRecentActivitySection.tsx");
2026-07-20 16:05:17 +00:00
export default function GuildPowerupsRecentActivitySection(guildId) {
2026-08-24 06:08:38 +00:00
let obj = apexExperiment;
2026-08-12 06:57:52 +00:00
const manaTypeConsolidationExperiment = obj.useManaTypeConsolidationExperiment("GuildPowerupsRecentActivitySection");
const tmp4 = callback();
2026-08-24 06:08:38 +00:00
const arr = useMaybeGetSortedBoostsDefault(guildId.guildId, 10);
2026-08-12 06:57:52 +00:00
let tmp6Result = null;
2026-07-20 16:05:17 +00:00
if (0 !== arr.length) {
2026-08-04 21:03:28 +00:00
obj = { style: null, children: null };
2026-08-12 06:57:52 +00:00
obj[0] = tmp4.sectionContainer;
let str = "text-subtle";
if (manaTypeConsolidationExperiment) {
str = "text-strong";
}
obj = { variant: "heading-lg/semibold", color: null, children: null };
obj[1] = str;
const intl = tmp(1236).intl;
obj[2] = intl.string(tmp(1236).t.yM9Krm);
2026-08-24 06:08:38 +00:00
const items = [closure_5(tmp(4739).Text, obj), ];
obj1 = { style: null, children: null };
2026-08-12 06:57:52 +00:00
obj1[0] = tmp4.boostContainer;
obj1[1] = arr.map((boost) => callback(closure_8, { row: boost }, "boost-" + boost.boost.id));
items[1] = closure_5(View, obj1);
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-08-12 06:57:52 +00:00
tmp6Result = closure_6(tmp7, obj);
const tmp6 = closure_6;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
return tmp6Result;
2026-07-20 16:05:17 +00:00
};