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

122 lines
5.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11789
// Function ID: 11790
2026-07-20 16:05:17 +00:00
// Name: GuildPowerupsPerkCard
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 21, 4668, 712, 4314, 1363, 8347, 11786, 11741, 4761, 4739, 11742, 1297, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 11789 (GuildPowerupsPerkCard)
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import AccessibilityAnnouncer from "AccessibilityAnnouncer" /* 1363 */;
import useThemeDefault from "useTheme" /* 4314 */;
import Text from "Text" /* 4739 */;
import LinearGradientDefault from "LinearGradient" /* 4761 */;
import apexExperiment from "apexExperiment" /* 8347 */;
import GuildPowerupCardFooterActive from "GuildPowerupCardFooterActive" /* 11742 */;
import { View } from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c4, jsxs: c5 } = jsxProd);
createCacheKey = { container: null, card: null, contentContainer: null, imageContainer: null, gradient: null, headerContainer: null, badge: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { marginHorizontal: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { padding: 0, overflow: "hidden" };
2026-08-24 06:08:38 +00:00
createCacheKey[2] = { gap: ThemesDefault.space.PX_16, padding: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
createCacheKey[3] = { width: "100%", height: 160 };
createCacheKey[4] = { position: "absolute", left: 0, right: 0, top: 0, height: "100%" };
2026-08-24 06:08:38 +00:00
let obj1 = { gap: ThemesDefault.space.PX_16, padding: ThemesDefault.space.PX_16 };
createCacheKey[5] = { gap: ThemesDefault.space.PX_4 };
const obj2 = { gap: ThemesDefault.space.PX_4 };
createCacheKey[6] = { position: "absolute", top: ThemesDefault.space.PX_12, right: ThemesDefault.space.PX_12 };
let closure_6 = createCacheKey.createStyles(createCacheKey);
let obj3 = { position: "absolute", top: ThemesDefault.space.PX_12, right: ThemesDefault.space.PX_12 };
const result = require("set").fileFinishedImporting("modules/premium/powerups/native/GuildPowerupsPerkCard.tsx");
2026-07-20 16:05:17 +00:00
export default function GuildPowerupsPerkCard(arg0) {
({ imageUrl, isImageAnimated } = arg0);
({ title, description } = arg0);
if (isImageAnimated === undefined) {
isImageAnimated = true;
}
({ riveComponent, status, badge } = arg0);
({ style, onPress } = arg0);
2026-07-29 08:29:29 +00:00
const merged = Object.assign(arg0, Object.create(null));
2026-08-24 06:08:38 +00:00
const tmp2 = callback2();
let obj = AccessibilityAnnouncer;
const tmp5 = useThemeDefault();
obj1 = apexExperiment;
2026-08-12 06:57:52 +00:00
const manaTypeConsolidationExperiment = obj1.useManaTypeConsolidationExperiment("GuildPowerupsPerkCard");
2026-08-24 06:08:38 +00:00
const isThemeDarkResult = obj.isThemeDark(useThemeDefault());
2026-07-29 08:29:29 +00:00
obj = { containerStyle: items, style: tmp2.card, status, onPress, children: null };
items = [tmp2.container, style];
obj = { style: tmp2.imageContainer, children: null };
2026-08-24 06:08:38 +00:00
let tmp3Result = tmp3(11786);
2026-07-29 08:29:29 +00:00
if (riveComponent == null) {
2026-08-24 06:08:38 +00:00
tmp3Result = tmp3(11741);
2026-07-29 08:29:29 +00:00
if (imageUrl == null) {
imageUrl = "";
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
obj1 = { imageUrl: null, isAnimated: null };
2026-07-29 08:29:29 +00:00
obj1[0] = imageUrl;
obj1[1] = isImageAnimated;
riveComponent = callback(tmp3Result, obj1);
2026-08-12 06:57:52 +00:00
const tmp13 = callback;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items1 = [riveComponent, ];
2026-08-24 06:08:38 +00:00
const tmp9 = obj.isThemeDark(useThemeDefault()) ? ["#0f101100", "#0f101166"] : ["#0f101100", "#0f10111a"];
items1[1] = callback(LinearGradientDefault, { colors: obj.isThemeDark(useThemeDefault()) ? ["#0f101100", "#0f101166"] : ["#0f101100", "#0f10111a"], style: tmp2.gradient });
2026-07-29 08:29:29 +00:00
obj[1] = items1;
const items2 = [closure_5(View, obj), , , ];
const obj3 = { style: tmp2.contentContainer, children: null };
const obj4 = { style: tmp2.headerContainer, children: null };
2026-08-12 06:57:52 +00:00
let str;
if (manaTypeConsolidationExperiment) {
str = "text-strong";
}
const obj5 = { color: str, variant: null, children: null };
let str2 = "heading-md/bold";
if (manaTypeConsolidationExperiment) {
str2 = "experimental/heading-md/semibold";
}
obj5[1] = str2;
obj5[2] = title;
2026-08-24 06:08:38 +00:00
const items3 = [callback(Text.Text, obj5), ];
2026-08-12 06:57:52 +00:00
let str3 = "text-sm/medium";
if (manaTypeConsolidationExperiment) {
str3 = "experimental/body-sm/normal";
}
2026-08-24 06:08:38 +00:00
items3[1] = callback(Text.Text, { variant: str3, children: description });
2026-07-29 08:29:29 +00:00
obj4[1] = items3;
const items4 = [closure_5(View, obj4), ];
2026-08-12 06:57:52 +00:00
const obj6 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
2026-08-12 06:57:52 +00:00
obj6.status = status;
2026-08-24 06:08:38 +00:00
items4[1] = callback(GuildPowerupCardFooterActive.GuildPowerupsCardFooter, obj6);
2026-07-29 08:29:29 +00:00
obj3[1] = items4;
items2[1] = closure_5(View, obj3);
2026-08-12 06:57:52 +00:00
let tmp15Result = "new" === badge;
if (tmp15Result) {
const obj7 = { text: null, style: null };
2026-07-29 08:29:29 +00:00
const intl = tmp6(1236).intl;
2026-08-12 06:57:52 +00:00
obj7[0] = intl.string(tmp6(1236).t.y2b7CA);
obj7[1] = tmp2.badge;
tmp15Result = tmp15(tmp6(1297).TextBadge, obj7);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items2[2] = tmp15Result;
tmp15Result = "beta" === badge;
if (tmp15Result) {
const obj8 = { text: null, color: null, style: null };
2026-07-29 08:29:29 +00:00
const intl2 = tmp6(1236).intl;
2026-08-12 06:57:52 +00:00
obj8[0] = intl2.string(tmp6(1236).t.oW0eUd);
obj8[1] = tmp6(1297).BadgeColors.BRAND;
obj8[2] = tmp2.badge;
tmp15Result = tmp15(tmp6(1297).TextBadge, obj8);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items2[3] = tmp15Result;
2026-07-29 08:29:29 +00:00
obj[4] = items2;
return closure_5(tmp3Result, obj);
2026-07-20 16:05:17 +00:00
};