// Module ID: 14358 // Function ID: 14359 // Name: AvatarDecorationPreviewImage // Dependencies: [19, 17, 8965, 21, 4380, 14357, 712, 9538, 8944, 9541, 11723, 7840, 7849, 1950, 1947, 2] // Exports: default // Module 14358 (AvatarDecorationPreviewImage) import noopAll from "noop" /* 19 */; import ThemesDefault from "Themes" /* 712 */; import CollectiblesItemType from "CollectiblesItemType" /* 1950 */; import useMaybeFetchProfileFrameDefault from "useMaybeFetchProfileFrame" /* 8944 */; import getNameplateAssets from "getNameplateAssets" /* 9538 */; import ShopIcon from "ShopIcon" /* 11723 */; import getCollectibleTypeName from "getCollectibleTypeName" /* 14357 */; import get_ActivityIndicator from "get ActivityIndicator" /* 17 */; import { PROFILE_FRAME_ASPECT_RATIO as closure_5 } from "PROFILE_FRAME_RESPONSIVE_RAIL_MIN_ASPECT_RATIO" /* 8965 */; import { jsx } from "jsxProd" /* 21 */; import createCacheKey from "createCacheKey" /* 4380 */; require = arg1; function AvatarDecorationPreviewImage(arg0) { ({ product, styles } = arg0); let obj = getCollectibleTypeName; const avatarDecorationPreviewUrl = obj.getAvatarDecorationPreviewUrl(product); let tmp2 = null; if (null != avatarDecorationPreviewUrl) { obj = { source: null, style: null, fadeDuration: 0 }; obj = { uri: null }; obj[0] = avatarDecorationPreviewUrl; obj[0] = obj; obj[1] = styles.avatarDecorationPreview; tmp2 = ; } return tmp2; } function NameplatePreviewImage(styles) { styles = styles.styles; let obj = getNameplateAssets; const staticImageUrl = obj.getNameplateAssets(styles.nameplateData).staticImageUrl; let tmp = null; if (null != staticImageUrl) { obj = { style: null, children: null }; obj[0] = styles.nameplateContainer; obj = { source: null, style: null, resizeMode: "cover", fadeDuration: 0 }; obj1 = { uri: null }; obj1[0] = staticImageUrl; obj[0] = obj1; obj[1] = styles.nameplatePreview; obj[1] = ; tmp = ; } return tmp; } function ProfileEffectPreviewImage(arg0) { ({ product, styles } = arg0); let obj = getCollectibleTypeName; const profileEffectPreviewUrl = obj.getProfileEffectPreviewUrl(product); let tmp2 = null; if (null != profileEffectPreviewUrl) { obj = { source: null, style: null, fadeDuration: 0 }; obj = { uri: null }; obj[0] = profileEffectPreviewUrl; obj[0] = obj; obj[1] = styles.avatarDecorationPreview; tmp2 = ; } return tmp2; } function ProfileFramePreviewImage(arg0) { ({ product, styles } = arg0); const tmp3 = useMaybeFetchProfileFrameDefault(product.skuId, "FamilyCenterActivityItemPreview"); let tmp4 = null; if (null != tmp3) { let obj = { style: null, children: null }; obj[0] = styles.profileFrameContainer; obj = { profileFrame: null, previewWidth: null, previewHeight: null, profileBackgroundColor: null }; obj[0] = tmp3; obj[1] = getCollectibleTypeName.PREVIEW_SIZE * closure_5; obj[2] = getCollectibleTypeName.PREVIEW_SIZE; obj[3] = tmp(712).colors.BACKGROUND_BASE_LOW; obj[1] = jsx(tmp(9541), { profileFrame: null, previewWidth: null, previewHeight: null, profileBackgroundColor: null }); tmp4 = ; const tmpResult = tmp(9541); } return tmp4; } function SubscriptionPreview(arg0) { ({ subscriptionPlanId, styles } = arg0); if (null == subscriptionPlanId) { let obj = { style: null, children: null }; obj[0] = styles.purchasePlaceholder; obj = { size: "custom", style: null }; obj[1] = { width: 20, height: 20 }; obj[1] = jsx(ShopIcon.ShopIcon, { size: "custom", style: null }); return ; } else { obj1 = { style: null, children: null }; obj1[0] = styles.purchasePlaceholder; if (obj4.isGuildBoostSubscription(subscriptionPlanId)) { let NitroWheelIcon = tmp5(7840).BoostGemIcon; } else { NitroWheelIcon = tmp5(7849).NitroWheelIcon; } obj = { size: "custom", style: null }; obj[1] = { width: 20, height: 20 }; obj1[1] = ; return {null}; } } function CollectiblePreview(arg0) { ({ product, styles } = arg0); if (null == product) { let obj = { style: null, children: null }; obj[0] = styles.purchasePlaceholder; obj = { size: "custom", style: null }; obj[1] = { width: 20, height: 20 }; obj[1] = jsx(ShopIcon.ShopIcon, { size: "custom", style: null }); return ; } else { const type = product.type; if (CollectiblesItemType.CollectiblesItemType.AVATAR_DECORATION === type) { obj1 = { product: null, styles: null }; obj1[0] = product; obj1[1] = styles; return ; } else if (tmp17(1950).CollectiblesItemType.NAMEPLATE === type) { const nameplateDataFromProductRecord = tmp17(1947).getNameplateDataFromProductRecord(product); let tmp8 = null; if (null != nameplateDataFromProductRecord) { const obj2 = { nameplateData: null, styles: null }; obj2[0] = nameplateDataFromProductRecord; obj2[1] = styles; tmp8 = ; } return tmp8; } else if (tmp17(1950).CollectiblesItemType.PROFILE_EFFECT === type) { const obj3 = { product: null, styles: null }; obj3[0] = product; obj3[1] = styles; return ; } else if (tmp17(1950).CollectiblesItemType.PROFILE_FRAME === type) { const obj4 = { product: null, styles: null }; obj4[0] = product; obj4[1] = styles; return ; } else { obj = { style: null, children: null }; obj[0] = styles.purchasePlaceholder; const obj5 = { size: "custom", style: null }; obj5[1] = { width: 20, height: 20 }; obj[1] = jsx(tmp17(11723).ShopIcon, { size: "custom", style: null }); return {null}; } } } noopAll; ({ View: c3, Image: c4 } = get_ActivityIndicator); createCacheKey = { purchasePlaceholder: null, avatarDecorationPreview: null, nameplateContainer: null, nameplatePreview: null, profileFrameContainer: null }; createCacheKey = { width: require("getCollectibleTypeName").PREVIEW_SIZE, height: require("getCollectibleTypeName").PREVIEW_SIZE, borderRadius: ThemesDefault.radii.xs, backgroundColor: ThemesDefault.colors.BACKGROUND_SURFACE_HIGH, display: "flex", alignItems: "center", justifyContent: "center", marginRight: 12 }; createCacheKey[0] = createCacheKey; createCacheKey[1] = { width: require("getCollectibleTypeName").PREVIEW_SIZE, height: require("getCollectibleTypeName").PREVIEW_SIZE, marginRight: 12 }; let obj1 = { width: require("getCollectibleTypeName").PREVIEW_SIZE, height: require("getCollectibleTypeName").PREVIEW_SIZE, marginRight: 12 }; createCacheKey[2] = { width: require("getCollectibleTypeName").PREVIEW_SIZE, height: require("getCollectibleTypeName").PREVIEW_SIZE, marginRight: 12, borderRadius: ThemesDefault.radii.xs, overflow: "hidden", position: "relative" }; let obj2 = { width: require("getCollectibleTypeName").PREVIEW_SIZE, height: require("getCollectibleTypeName").PREVIEW_SIZE, marginRight: 12, borderRadius: ThemesDefault.radii.xs, overflow: "hidden", position: "relative" }; createCacheKey[3] = { position: "absolute", right: 0, width: require("getCollectibleTypeName").PREVIEW_SIZE * require("getCollectibleTypeName").NAMEPLATE_ASPECT_RATIO, height: require("getCollectibleTypeName").PREVIEW_SIZE }; let obj3 = { position: "absolute", right: 0, width: require("getCollectibleTypeName").PREVIEW_SIZE * require("getCollectibleTypeName").NAMEPLATE_ASPECT_RATIO, height: require("getCollectibleTypeName").PREVIEW_SIZE }; createCacheKey[4] = { width: require("getCollectibleTypeName").PREVIEW_SIZE, height: require("getCollectibleTypeName").PREVIEW_SIZE, marginRight: 12, alignItems: "center", justifyContent: "center" }; let closure_7 = createCacheKey.createStyles(createCacheKey); let obj4 = { width: require("getCollectibleTypeName").PREVIEW_SIZE, height: require("getCollectibleTypeName").PREVIEW_SIZE, marginRight: 12, alignItems: "center", justifyContent: "center" }; const result = require("set").fileFinishedImporting("modules/parent_tools/native/FamilyCenterActivityItemPreview.tsx"); export default function FamilyCenterActivityItemPreview(arg0) { ({ displayName, product, isSubscription, subscriptionPlanId } = arg0); const tmp = callback(); let obj = { accessible: true, accessibilityLabel: displayName, children: null }; if (isSubscription) { obj = { subscriptionPlanId: null, styles: null }; obj[0] = subscriptionPlanId; obj[1] = tmp; let tmp2Result = tmp2(SubscriptionPreview, obj); } else { obj = { product: null, styles: null }; obj[0] = product; obj[1] = tmp; tmp2Result = tmp2(CollectiblePreview, obj); } obj[2] = tmp2Result; return {null}; };