try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`45bc24e7-075b-4f12-a20b-7d9d974d6efa`,e._sentryDebugIdIdentifier=`sentry-dbid-45bc24e7-075b-4f12-a20b-7d9d974d6efa`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Fg as n,Ig as r,ch as i,eh as a,gr as o,hn as s,lh as c,p as l,w as u}from"./entry.client-dr7r6s9a.js";import{t as d}from"./gamepadUtils-rk5i47js.js";import{t as f}from"./PurchaseShell-bdt26dfl.js";import{t as p}from"./imageUtils-fgnptyto.js";var m=n(),h=e(r(),1),g=t(),_=e=>{let t=(0,m.c)(7),{locClose:n}=a(),r;t[0]===e.exit?r=t[1]:(r=()=>e.exit?.(),t[0]=e.exit,t[1]=r),d(r);let i=e.exit,c;t[2]===n?c=t[3]:(c=n(),t[2]=n,t[3]=c);let l;return t[4]!==e.exit||t[5]!==c?(l=(0,g.jsx)(o,{location:`PurchasedButtonPanel`,children:(0,g.jsx)(`div`,{className:`flex gap-layout-horizontal-gap`,children:(0,g.jsx)(s,{as:`button`,kind:`standard`,onPress:i,"data-auto-focus":!0,className:`w-full min-w-0 lg-10:max-w-[calc(var(--V1UN))]`,children:c})})}),t[4]=e.exit,t[5]=c,t[6]=l):l=t[6],l},v=({product:e,exit:t})=>{let{t:n}=c(`PurchasedPage`),{trackAppAction:r}=i();return(0,h.useEffect)(()=>{r(`ShowPurchaseSuccess`,{productId:e.title},{location:`PurchasedPage`})},[r,e.title]),(0,g.jsx)(f,{backgroundUrl:e.poster?.url,useGradientBackdrop:!0,children:(0,g.jsx)(`div`,{className:`relative me-layout-horizontal-margin ms-layout-horizontal-margin flex h-full flex-col justify-center lg-10:flex-row`,children:(0,g.jsxs)(`div`,{className:`flex w-full grow flex-col justify-center`,children:[(0,g.jsxs)(`div`,{className:`mb-layout-horizontal-margin mt-[30%] flex shrink flex-row items-center justify-center gap-layout-vertical-new-section-tight lg-10:mb-[92px] lg-10:mt-[0px]`,children:[(0,g.jsx)(u,{src:e.poster?.url,alt:e.title,className:`max-w-[200px] rounded-regular shadow-[0px_0px_8px_0px_rgba(0,0,0,0.15)]`,containerProps:{className:`w-[112px] sm-10:w-[160px] shrink-0 lg-10:w-[200px]`},aspectRatio:p(e.poster?.width,e.poster?.height)||`2/3`,getResizedImageUrl:l,constraintSet:{entries:[{query:`LG_10`,size:{width:200},imageType:`jpg`},{query:`SM_10`,size:{width:160},imageType:`jpg`}],defaultEntry:{size:{width:112},imageType:`jpg`}}}),(0,g.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-center gap-4`,children:[(0,g.jsx)(`h1`,{className:`text-noninteractive-content-primary-content type-display2`,children:n(`It's yours!`,{shortKey:`thank_you_header_text`})}),(0,g.jsx)(`p`,{className:`text-noninteractive-content-primary-content type-subtitle2`,children:n(`Thank you for your purchase!`,{shortKey:`thank_you_subheader_text`})})]})]}),(0,g.jsx)(`div`,{className:`mb-layout-horizontal-margin mt-[20%] lg-10:mb-[0px] lg-10:mt-0`,children:(0,g.jsx)(_,{exit:t})})]})})})};export{_ as ButtonPanel,v as default};