// Module ID: 14958 // Function ID: 14959 // Name: FamilyCenterActivityItemPreview // Dependencies: [19, 17, 8308, 21, 4607, 14957, 576, 8913, 8287, 8916, 12233, 9468, 8755, 1889, 1886, 2] // Exports: default // Module 14958 (FamilyCenterActivityItemPreview) import nativeDefault from "native" /* 576 */; import CollectiblesItemType from "CollectiblesItemType" /* 1889 */; import useMaybeFetchProfileFrameDefault from "useMaybeFetchProfileFrame" /* 8287 */; import NameplateUtils from "NameplateUtils" /* 8913 */; import ShopIcon from "ShopIcon" /* 12233 */; import FamilyCenterActivityPurchaseRowUtils from "FamilyCenterActivityPurchaseRowUtils" /* 14957 */; import noop from "module_19" /* 19 */; require = fn; function AvatarDecorationPreviewImage(arg0) { ({ product, styles } = arg0); const avatarDecorationPreviewUrl = FamilyCenterActivityPurchaseRowUtils.getAvatarDecorationPreviewUrl(product); let tmp2 = null; if (null != avatarDecorationPreviewUrl) { const obj2 = { source: null, style: null, fadeDuration: 0 }; const obj3 = { uri: avatarDecorationPreviewUrl }; obj2.source = obj3; obj2.style = styles.avatarDecorationPreview; tmp2 = ; } return tmp2; } function NameplatePreviewImage(styles) { styles = styles.styles; const staticImageUrl = NameplateUtils.getNameplateAssets(styles.nameplateData).staticImageUrl; let tmp = null; if (null != staticImageUrl) { const obj2 = { style: styles.nameplateContainer, children: null }; const obj3 = { source: null, style: null, resizeMode: "cover", fadeDuration: 0 }; const obj4 = { uri: staticImageUrl }; obj3.source = obj4; obj3.style = styles.nameplatePreview; obj2.children = ; tmp = {null}; } return tmp; } function ProfileEffectPreviewImage(arg0) { ({ product, styles } = arg0); const profileEffectPreviewUrl = FamilyCenterActivityPurchaseRowUtils.getProfileEffectPreviewUrl(product); let tmp2 = null; if (null != profileEffectPreviewUrl) { const obj2 = { source: null, style: null, fadeDuration: 0 }; const obj3 = { uri: profileEffectPreviewUrl }; obj2.source = obj3; obj2.style = styles.avatarDecorationPreview; tmp2 = ; } return tmp2; } function ProfileFramePreviewImage(arg0) { ({ product, styles } = arg0); const tmp3 = useMaybeFetchProfileFrameDefault(product.skuId, "FamilyCenterActivityItemPreview"); let tmp4 = null; if (null != tmp3) { const obj = { style: styles.profileFrameContainer, children: null }; const obj2 = { profileFrame: tmp3, previewWidth: FamilyCenterActivityPurchaseRowUtils.PREVIEW_SIZE * closure_5, previewHeight: FamilyCenterActivityPurchaseRowUtils.PREVIEW_SIZE, profileBackgroundColor: tmp(576).colors.BACKGROUND_BASE_LOW }; obj.children = jsx(tmp(8916), { profileFrame: tmp3, previewWidth: FamilyCenterActivityPurchaseRowUtils.PREVIEW_SIZE * closure_5, previewHeight: FamilyCenterActivityPurchaseRowUtils.PREVIEW_SIZE, profileBackgroundColor: tmp(576).colors.BACKGROUND_BASE_LOW }); tmp4 = {null}; const tmpResult = tmp(8916); } return tmp4; } function SubscriptionPreview(arg0) { ({ subscriptionPlanId, styles } = arg0); if (null == subscriptionPlanId) { const obj2 = { style: styles.purchasePlaceholder, children: null }; const obj3 = { size: "custom", style: { width: 20, height: 20 } }; obj2.children = jsx(ShopIcon.ShopIcon, { size: "custom", style: { width: 20, height: 20 } }); return {null}; } else { const obj5 = { style: styles.purchasePlaceholder, children: null }; if (obj4.isGuildBoostSubscription(subscriptionPlanId)) { let NitroWheelIcon = tmp5(9468).BoostGemIcon; } else { NitroWheelIcon = tmp5(8755).NitroWheelIcon; } const obj = { size: "custom", style: { width: 20, height: 20 } }; obj5.children = ; return {null}; } } function CollectiblePreview(arg0) { ({ product, styles } = arg0); if (null == product) { const obj2 = { style: styles.purchasePlaceholder, children: null }; const obj3 = { size: "custom", style: { width: 20, height: 20 } }; obj2.children = jsx(ShopIcon.ShopIcon, { size: "custom", style: { width: 20, height: 20 } }); return {null}; } else { const type = product.type; if (CollectiblesItemType.CollectiblesItemType.AVATAR_DECORATION === type) { const obj4 = { product, styles }; return ; } else if (tmp17(1889).CollectiblesItemType.NAMEPLATE === type) { const nameplateDataFromProductRecord = tmp17(1886).getNameplateDataFromProductRecord(product); let tmp8 = null; if (null != nameplateDataFromProductRecord) { const obj5 = { nameplateData: nameplateDataFromProductRecord, styles }; tmp8 = ; } return tmp8; } else if (tmp17(1889).CollectiblesItemType.PROFILE_EFFECT === type) { const obj6 = { product, styles }; return ; } else if (tmp17(1889).CollectiblesItemType.PROFILE_FRAME === type) { const obj7 = { product, styles }; return ; } else { const obj = { style: styles.purchasePlaceholder, children: null }; const obj8 = { size: "custom", style: { width: 20, height: 20 } }; obj.children = jsx(tmp17(12233).ShopIcon, { size: "custom", style: { width: 20, height: 20 } }); return {null}; } } } get_ActivityIndicator = fn(17); ({ View: c3, Image: closure_4 } = get_ActivityIndicator); let closure_5 = fn(8308).PROFILE_FRAME_ASPECT_RATIO; const jsx = fn(21).jsx; const createStyles = fn(4607); let obj2 = { purchasePlaceholder: null, avatarDecorationPreview: null, nameplateContainer: null, nameplatePreview: null, profileFrameContainer: null }; let size = { width: fn(14957).PREVIEW_SIZE, height: fn(14957).PREVIEW_SIZE, borderRadius: nativeDefault.radii.xs, backgroundColor: nativeDefault.colors.BACKGROUND_SURFACE_HIGH, display: "flex", alignItems: "center", justifyContent: "center", marginRight: 12 }; obj2.purchasePlaceholder = size; const size1 = { width: fn(14957).PREVIEW_SIZE, height: fn(14957).PREVIEW_SIZE, marginRight: 12 }; obj2.avatarDecorationPreview = size1; const size2 = { width: fn(14957).PREVIEW_SIZE, height: fn(14957).PREVIEW_SIZE, marginRight: 12, borderRadius: nativeDefault.radii.xs, overflow: "hidden", position: "relative" }; obj2.nameplateContainer = size2; const size3 = { position: "absolute", right: 0, width: fn(14957).PREVIEW_SIZE * fn(14957).NAMEPLATE_ASPECT_RATIO, height: fn(14957).PREVIEW_SIZE }; obj2.nameplatePreview = size3; const size4 = { width: fn(14957).PREVIEW_SIZE, height: fn(14957).PREVIEW_SIZE, marginRight: 12, alignItems: "center", justifyContent: "center" }; obj2.profileFrameContainer = size4; let closure_7 = createStyles.createStyles(obj2); size = fn(2); const result = size.fileFinishedImporting("modules/parent_tools/native/FamilyCenterActivityItemPreview.tsx"); export default function FamilyCenterActivityItemPreview(arg0) { ({ displayName, product, isSubscription, subscriptionPlanId } = arg0); const tmp = closure_7(); const obj = { accessible: true, accessibilityLabel: displayName, children: null }; if (isSubscription) { const obj2 = { subscriptionPlanId, styles: tmp }; let tmp2Result = tmp2(SubscriptionPreview, obj2); } else { const obj3 = { product, styles: tmp }; tmp2Result = tmp2(CollectiblePreview, obj3); } obj.children = tmp2Result; return {null}; };