150 lines
6 KiB
TypeScript
150 lines
6 KiB
TypeScript
// Module ID: 12000
|
|
// Function ID: 12001
|
|
// Name: GuildPowerupsRecentActivityRow
|
|
// Dependencies: [17, 4334, 21, 4342, 712, 8240, 12001, 4031, 589, 8115, 7740, 12003, 12005, 1297, 4338, 12007, 1236, 2]
|
|
// Exports: default
|
|
|
|
// Module 12000 (GuildPowerupsRecentActivityRow)
|
|
import { View } from "set";
|
|
import maybeApplyNoTextColorForLightCustomTheme from "maybeApplyNoTextColorForLightCustomTheme";
|
|
import jsxProd from "jsxProd";
|
|
import createCacheKey from "createCacheKey";
|
|
|
|
let c5;
|
|
let closure_6;
|
|
function GuildPowerupsRecentActivityRow(row) {
|
|
let boost;
|
|
let phase;
|
|
let roleColor;
|
|
let roleColorStrings;
|
|
let sortKey;
|
|
let username;
|
|
row = row.row;
|
|
let obj = require(8240) /* apexExperiment */;
|
|
const manaTypeConsolidationExperiment = obj.useManaTypeConsolidationExperiment("GuildPowerupsRecentActivityRow");
|
|
({ boost, phase, sortKey } = row);
|
|
const tmp4 = callback();
|
|
let obj1 = require(12001) /* useMaybeGetSortedBoosts */;
|
|
const getBoostUserConfig = obj1.useGetBoostUserConfig(boost);
|
|
({ roleColor, roleColorStrings, username } = getBoostUserConfig);
|
|
let obj2 = require(4031) /* resetCache */;
|
|
const date = new Date(sortKey);
|
|
let obj3 = require(589) /* initialize */;
|
|
const items = [maybeApplyNoTextColorForLightCustomTheme];
|
|
const stateFromStores = obj3.useStateFromStores(items, () => roleStyle.roleStyle);
|
|
if ("username" === stateFromStores) {
|
|
if (null != roleColor) {
|
|
obj = { color: null };
|
|
obj[0] = roleColor;
|
|
}
|
|
let tmpResult = tmp(8115);
|
|
const processColorStringsArray = tmpResult.useProcessColorStringsArray(roleColorStrings);
|
|
tmpResult = tmp(8115);
|
|
const isRoleStyleAndRoleColorsEligibleForERC = tmpResult.useIsRoleStyleAndRoleColorsEligibleForERC(boost.guildId, boost.userId, stateFromStores, processColorStringsArray);
|
|
if ("gave" === phase) {
|
|
let BoostGemSlashIcon = tmp(7740).BoostGemIcon;
|
|
} else if ("expiring" === phase) {
|
|
BoostGemSlashIcon = tmp(12003).BoostTier1Icon;
|
|
} else {
|
|
BoostGemSlashIcon = tmp(12005).BoostGemSlashIcon;
|
|
}
|
|
obj = { style: null, children: null };
|
|
obj[0] = tmp4.boostRowContainer;
|
|
if ("gave" === phase) {
|
|
obj1 = { color: null, size: "sm" };
|
|
obj1[0] = importDefault(712).unsafe_rawColors.GUILD_BOOSTING_PINK;
|
|
obj2 = obj1;
|
|
} else {
|
|
obj2 = { size: "sm" };
|
|
}
|
|
const items1 = [closure_5(BoostGemSlashIcon, obj2), , ];
|
|
obj3 = { style: null, children: null };
|
|
obj3[0] = tmp4.boostMessage;
|
|
let tmp19Result = "dot" === stateFromStores;
|
|
if (tmp19Result) {
|
|
tmp19Result = null != roleColor;
|
|
}
|
|
if (tmp19Result) {
|
|
const obj4 = { size: "small", color: null, colors: null };
|
|
obj4[1] = roleColor;
|
|
obj4[2] = roleColorStrings;
|
|
tmp19Result = tmp19(tmp(1297).RoleDot, obj4);
|
|
}
|
|
const items2 = [tmp19Result, , , ];
|
|
const obj5 = { variant: "text-md/medium", color: "interactive-text-active", lineClamp: 1, style: null, gradientColors: null, children: null };
|
|
const items3 = [tmp4.username, {}];
|
|
obj5[3] = items3;
|
|
let tmp23;
|
|
if (isRoleStyleAndRoleColorsEligibleForERC) {
|
|
tmp23 = processColorStringsArray;
|
|
}
|
|
obj5[4] = tmp23;
|
|
obj5[5] = username;
|
|
items2[1] = closure_5(tmp(4338).Text, obj5);
|
|
items2[2] = closure_5(tmp(4338).Text, { variant: "text-md/medium", color: "interactive-text-active", children: " " });
|
|
const obj6 = { variant: "text-md/medium", lineClamp: 1, style: null, children: null };
|
|
obj6[2] = tmp4.messageText;
|
|
obj6[3] = importDefault(12007)(row);
|
|
items2[3] = closure_5(tmp(4338).Text, obj6);
|
|
obj3[1] = items2;
|
|
items1[1] = closure_6(View, obj3);
|
|
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;
|
|
items1[2] = closure_5(tmp(4338).Text, obj7);
|
|
obj[1] = items1;
|
|
return closure_6(View, obj);
|
|
}
|
|
}
|
|
({ 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 };
|
|
const result = require("jsxProd").fileFinishedImporting("modules/premium/powerups/native/GuildPowerupsRecentActivitySection.tsx");
|
|
|
|
export default function GuildPowerupsRecentActivitySection(guildId) {
|
|
let obj = require(8240) /* apexExperiment */;
|
|
const manaTypeConsolidationExperiment = obj.useManaTypeConsolidationExperiment("GuildPowerupsRecentActivitySection");
|
|
const tmp4 = callback();
|
|
const arr = importDefault(12001)(guildId.guildId, 10);
|
|
let tmp6Result = null;
|
|
if (0 !== arr.length) {
|
|
obj = { style: null, children: null };
|
|
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);
|
|
const items = [closure_5(tmp(4338).Text, obj), ];
|
|
const obj1 = { style: null, children: null };
|
|
obj1[0] = tmp4.boostContainer;
|
|
obj1[1] = arr.map((boost) => callback(closure_8, { row: boost }, "boost-" + boost.boost.id));
|
|
items[1] = closure_5(View, obj1);
|
|
obj[1] = items;
|
|
tmp6Result = closure_6(tmp7, obj);
|
|
const tmp6 = closure_6;
|
|
}
|
|
return tmp6Result;
|
|
};
|