decord/source/modules/premium/powerups/native/GuildPowerupsPerkCard.tsx
github-actions 20a21ad13f chore: update source for alpha 346.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
2026-09-11 19:12:58 +00:00

113 lines
4.9 KiB
TypeScript

// Module ID: 12664
// Function ID: 12665
// Name: GuildPowerupsPerkCard
// Dependencies: [19, 17, 21, 4606, 576, 4541, 4458, 7053, 12661, 12616, 5038, 4602, 12617, 1178, 1114, 2]
// Exports: default
// Module 12664 (GuildPowerupsPerkCard)
import nativeDefault from "native" /* 576 */;
import shared from "shared" /* 4458 */;
import useThemeDefault from "useTheme" /* 4541 */;
import Text_Text from "Text/Text" /* 4602 */;
import LinearGradientDefault from "LinearGradient" /* 5038 */;
import ManaTypeConsolidationExperiment from "ManaTypeConsolidationExperiment" /* 7053 */;
import GuildPowerupsCardFooter from "GuildPowerupsCardFooter" /* 12617 */;
import GuildPowerupsCardDefault from "GuildPowerupsCard" /* 12661 */;
import noop from "module_19" /* 19 */;
require = fn;
const View = fn(17).View;
const jsxProd = fn(21);
({ jsx: closure_4, jsxs: hasOwnProperty } = jsxProd);
const createStyles = fn(4606);
let obj2 = { container: { marginHorizontal: nativeDefault.space.PX_16 }, card: { padding: 0, overflow: "hidden" }, contentContainer: null, imageContainer: null, gradient: null, headerContainer: null, badge: null };
let obj3 = { marginHorizontal: nativeDefault.space.PX_16 };
obj2.contentContainer = { gap: nativeDefault.space.PX_16, padding: nativeDefault.space.PX_16 };
obj2.imageContainer = { width: "100%", height: 160 };
obj2.gradient = { position: "absolute", left: 0, right: 0, top: 0, height: "100%" };
let obj4 = { gap: nativeDefault.space.PX_16, padding: nativeDefault.space.PX_16 };
obj2.headerContainer = { gap: nativeDefault.space.PX_4 };
const rect = { position: "absolute", top: nativeDefault.space.PX_12, right: nativeDefault.space.PX_12 };
obj2.badge = rect;
let closure_6 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/premium/powerups/native/GuildPowerupsPerkCard.tsx");
export default function GuildPowerupsPerkCard(arg0) {
({ imageUrl, isImageAnimated } = arg0);
({ title, description } = arg0);
if (isImageAnimated === undefined) {
isImageAnimated = true;
}
({ riveComponent, status, badge } = arg0);
({ style, onPress } = arg0);
const merged = Object.assign(arg0, Object.assign({ title: 0, description: 0, imageUrl: 0, isImageAnimated: 0, riveComponent: 0, style: 0, onPress: 0, status: 0, badge: 0 }));
const tmp2 = closure_6();
const tmp5 = useThemeDefault();
const isThemeDarkResult = shared.isThemeDark(tmp5);
const manaTypeConsolidationExperiment = ManaTypeConsolidationExperiment.useManaTypeConsolidationExperiment("GuildPowerupsPerkCard");
const obj3 = { containerStyle: null, style: tmp2.card, status, onPress, children: null };
const items = [tmp2.container, style];
obj3.containerStyle = items;
const obj4 = { style: tmp2.imageContainer, children: null };
const tmp9 = isThemeDarkResult ? ["#0f101100", "#0f101166"] : ["#0f101100", "#0f10111a"];
if (riveComponent == null) {
if (imageUrl == null) {
imageUrl = "";
}
const obj5 = { imageUrl, isAnimated: isImageAnimated };
riveComponent = React4(tmp3(12616), obj5);
const tmp3Result2 = tmp3(12616);
}
const items1 = [riveComponent, React4(LinearGradientDefault, { colors: tmp9, style: tmp2.gradient })];
obj4.children = items1;
const items2 = [hasOwnProperty(View, obj4), , , ];
const obj7 = { style: tmp2.contentContainer, children: null };
const obj8 = { style: tmp2.headerContainer, children: null };
let str;
if (manaTypeConsolidationExperiment) {
str = "text-strong";
}
const obj9 = { color: str, variant: null, children: null };
let str2 = "heading-md/bold";
if (manaTypeConsolidationExperiment) {
str2 = "experimental/heading-md/semibold";
}
obj9.variant = str2;
obj9.children = title;
const items3 = [React4(Text_Text.Text, obj9), ];
let str3 = "text-sm/medium";
if (manaTypeConsolidationExperiment) {
str3 = "experimental/body-sm/normal";
}
items3[1] = React4(Text_Text.Text, { variant: str3, children: description });
obj8.children = items3;
const items4 = [hasOwnProperty(View, obj8), ];
const obj10 = {};
const merged1 = Object.assign(merged);
obj10.status = status;
items4[1] = React4(GuildPowerupsCardFooter.GuildPowerupsCardFooter, obj10);
obj7.children = items4;
items2[1] = hasOwnProperty(View, obj7);
let tmp15Result = "new" === badge;
if (tmp15Result) {
const obj11 = { text: null, style: null };
const intl = tmp6(1114).intl;
obj11.text = intl.string(tmp6(1114).t.y2b7CA);
obj11.style = tmp2.badge;
tmp15Result = tmp15(tmp6(1178).TextBadge, obj11);
}
items2[2] = tmp15Result;
let tmp15Result2 = "beta" === badge;
if (tmp15Result2) {
const obj12 = { text: null, color: null, style: null };
const intl2 = tmp6(1114).intl;
obj12.text = intl2.string(tmp6(1114).t.oW0eUd);
obj12.color = tmp6(1178).BadgeColors.BRAND;
obj12.style = tmp2.badge;
tmp15Result2 = tmp15(tmp6(1178).TextBadge, obj12);
}
items2[3] = tmp15Result2;
obj3.children = items2;
return hasOwnProperty(GuildPowerupsCardDefault, obj3);
};