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

131 lines
5.4 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 11822
// Function ID: 11823
2026-07-20 16:05:17 +00:00
// Name: GuildPowerupsRecentActivityRow
2026-08-05 07:35:12 +00:00
// Dependencies: [17, 4247, 21, 4255, 712, 11823, 3925, 589, 7852, 7588, 11825, 11827, 1297, 4251, 11829, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 11822 (GuildPowerupsRecentActivityRow)
2026-08-04 21:03:28 +00:00
import { View } from "get ActivityIndicator";
2026-07-29 08:29:29 +00:00
import maybeApplyNoTextColorForLightCustomTheme from "maybeApplyNoTextColorForLightCustomTheme";
2026-07-23 10:11:24 +00:00
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c5;
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-20 16:05:17 +00:00
function GuildPowerupsRecentActivityRow(row) {
let boost;
let phase;
let roleColor;
let roleColorStrings;
let sortKey;
2026-07-29 08:29:29 +00:00
let username;
2026-07-20 16:05:17 +00:00
row = row.row;
({ boost, phase, sortKey } = row);
2026-07-23 10:11:24 +00:00
const tmp = callback3();
2026-08-05 07:35:12 +00:00
let obj = require(11823) /* useMaybeGetSortedBoosts */;
2026-07-20 16:05:17 +00:00
const getBoostUserConfig = obj.useGetBoostUserConfig(boost);
2026-07-29 08:29:29 +00:00
({ roleColor, roleColorStrings, username } = getBoostUserConfig);
2026-08-05 07:35:12 +00:00
let obj1 = require(3925) /* resetCache */;
2026-08-04 21:03:28 +00:00
const date = new Date(sortKey);
let obj2 = require(589) /* initialize */;
2026-07-29 08:29:29 +00:00
const items = [maybeApplyNoTextColorForLightCustomTheme];
2026-08-04 21:03:28 +00:00
const stateFromStores = obj2.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-05 07:35:12 +00:00
let tmp2Result = tmp2(7852);
2026-08-04 21:03:28 +00:00
const processColorStringsArray = tmp2Result.useProcessColorStringsArray(roleColorStrings);
2026-08-05 07:35:12 +00:00
tmp2Result = tmp2(7852);
2026-08-04 21:03:28 +00:00
const isRoleStyleAndRoleColorsEligibleForERC = tmp2Result.useIsRoleStyleAndRoleColorsEligibleForERC(boost.guildId, boost.userId, stateFromStores, processColorStringsArray);
2026-07-20 16:05:17 +00:00
if ("gave" === phase) {
2026-08-05 07:35:12 +00:00
let BoostGemSlashIcon = tmp2(7588).BoostGemIcon;
2026-07-20 16:05:17 +00:00
} else if ("expiring" === phase) {
2026-08-05 07:35:12 +00:00
BoostGemSlashIcon = tmp2(11825).BoostTier1Icon;
2026-07-20 16:05:17 +00:00
} else {
2026-08-05 07:35:12 +00:00
BoostGemSlashIcon = tmp2(11827).BoostGemSlashIcon;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = tmp.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-07-29 08:29:29 +00:00
obj1[0] = importDefault(712).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), , ];
const obj3 = { style: null, children: null };
obj3[0] = tmp.boostMessage;
2026-08-04 21:03:28 +00:00
let tmp18Result = "dot" === stateFromStores;
if (tmp18Result) {
tmp18Result = null != roleColor;
2026-07-20 16:05:17 +00:00
}
2026-08-04 21:03:28 +00:00
if (tmp18Result) {
2026-07-29 08:29:29 +00:00
const obj4 = { size: "small", color: null, colors: null };
obj4[1] = roleColor;
obj4[2] = roleColorStrings;
2026-08-04 21:03:28 +00:00
tmp18Result = tmp18(tmp2(1297).RoleDot, obj4);
2026-07-20 16:05:17 +00:00
}
2026-08-04 21:03:28 +00:00
const items2 = [tmp18Result, , , ];
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-07-20 16:05:17 +00:00
const items3 = [tmp.username, {}];
2026-07-29 08:29:29 +00:00
obj5[3] = items3;
2026-08-04 21:03:28 +00:00
let tmp22;
2026-07-20 16:05:17 +00:00
if (isRoleStyleAndRoleColorsEligibleForERC) {
2026-08-04 21:03:28 +00:00
tmp22 = processColorStringsArray;
2026-07-20 16:05:17 +00:00
}
2026-08-04 21:03:28 +00:00
obj5[4] = tmp22;
2026-07-29 08:29:29 +00:00
obj5[5] = username;
2026-08-05 07:35:12 +00:00
items2[1] = closure_5(tmp2(4251).Text, obj5);
items2[2] = closure_5(tmp2(4251).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 };
obj6[2] = tmp.messageText;
2026-08-05 07:35:12 +00:00
obj6[3] = importDefault(11829)(row);
items2[3] = closure_5(tmp2(4251).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-07-29 08:29:29 +00:00
const obj7 = { variant: "text-xs/semibold", style: null, children: null };
obj7[1] = tmp.timestamp;
obj7[2] = calendarFormatResult;
2026-08-05 07:35:12 +00:00
items1[2] = closure_5(tmp2(4251).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-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 };
obj = { marginTop: require("Themes").space.PX_16, paddingHorizontal: require("Themes").space.PX_16 };
obj[0] = obj;
obj[1] = { gap: require("Themes").space.PX_12, marginTop: require("Themes").space.PX_16 };
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);
let obj1 = { gap: require("Themes").space.PX_12, marginTop: require("Themes").space.PX_16 };
2026-07-23 10:11:24 +00:00
const result = require("jsxProd").fileFinishedImporting("modules/premium/powerups/native/GuildPowerupsRecentActivitySection.tsx");
2026-07-20 16:05:17 +00:00
export default function GuildPowerupsRecentActivitySection(guildId) {
2026-07-23 10:11:24 +00:00
const tmp = callback3();
2026-08-05 07:35:12 +00:00
const arr = importDefault(11823)(guildId.guildId, 10);
2026-08-04 21:03:28 +00:00
let tmp3 = null;
2026-07-20 16:05:17 +00:00
if (0 !== arr.length) {
2026-08-04 21:03:28 +00:00
let obj = { style: null, children: null };
2026-07-29 08:29:29 +00:00
obj[0] = tmp.sectionContainer;
obj = { variant: "heading-lg/semibold", color: "text-subtle", children: null };
2026-08-04 21:03:28 +00:00
const intl = require(1236) /* getSystemLocale */.intl;
obj[2] = intl.string(require(1236) /* getSystemLocale */.t.yM9Krm);
2026-08-05 07:35:12 +00:00
const items = [callback(require(4251) /* Text */.Text, obj), ];
2026-08-04 21:03:28 +00:00
obj = { style: null, children: null };
obj[0] = tmp.boostContainer;
obj[1] = arr.map((boost) => callback(closure_8, { row: boost }, "boost-" + boost.boost.id));
items[1] = callback(View, obj);
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-08-04 21:03:28 +00:00
tmp3 = callback2(View, obj);
2026-07-20 16:05:17 +00:00
}
2026-08-04 21:03:28 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
};