Module 113265

750 characters · in 739cd285837f4ced.js
Dependencies
Required by (2)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(t,e,r){r.d(e,{z:()=>a});var i=r(582128),n=r(575593),s=r(466459),l=r(116833),u=r(152472);function a(t){let{userId:e,product:r,selectedVariantIndex:a,location:o,onError:c}=t,d=i.useMemo(()=>r.type===n.R.VARIANTS_GROUP&&null!=a&&r.variants?.[a]!=null?r.variants[a]:r,[r,a]),S=d.skuId,I=(0,u.c)({userId:e,skuId:S,nuxGraphic:function(t){let{product:e}=t,r="6/4";switch(e.type){case n.R.NAMEPLATE:case n.R.AVATAR_DECORATION:r="16/9";break;case n.R.BUNDLE:case n.R.PROFILE_EFFECT:default:r="6/4"}return{type:"dynamic",component:l.DynamicGraphicComponent.COLLECTIBLES_PREVIEW,aspectRatio:r,props:{product:e,forCollectedModal:!0}}}({product:d}),location:o,onError:c}),{isPurchased:p}=(0,s.h)(d);return{...I,specificProductOrVariant:d,isPurchased:p}}}