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]=`74130db5-7b19-454c-9b7b-55a2bad691fb`,e._sentryDebugIdIdentifier=`sentry-dbid-74130db5-7b19-454c-9b7b-55a2bad691fb`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,Ai as r,Ct as i,Hm as a,Pt as o,Qm as s,jg as c,ng as l,xr as u}from"./entry.client-mpghtlrl.js";import{i as d,r as f}from"./purchasePageReadyUtils-h1z511qr.js";import{l as p}from"./PurchaseDialog-fpui7yuh.js";var m=n(),h=e(c(),1),g=l(),_=e=>{let t=(0,m.c)(7),{locClose:n}=a(),i;t[0]===e.exit?i=t[1]:(i=()=>e.exit?.(),t[0]=e.exit,t[1]=i),d(i);let o=e.exit,s;t[2]===n?s=t[3]:(s=n(),t[2]=n,t[3]=s);let c;return t[4]!==e.exit||t[5]!==s?(c=(0,g.jsx)(r,{location:`PurchasedButtonPanel`,children:(0,g.jsx)(`div`,{className:`flex gap-layout-horizontal-gap`,children:(0,g.jsx)(u,{as:`button`,kind:`standard`,onPress:o,"data-auto-focus":!0,className:`w-full lg-10:w-auto lg-10:min-w-component-action-text-standard-min-width`,children:s})})}),t[4]=e.exit,t[5]=s,t[6]=c):c=t[6],c},v=({product:e,exit:n,messageHeader:r,messageBody:a})=>{let{t:c}=t(`PurchasedPage`),{trackAppAction:l}=s();return(0,h.useEffect)(()=>{l(`ShowPurchaseSuccess`,{productId:e.title},{location:`PurchasedPage`})},[l,e.title]),(0,g.jsx)(p,{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)(o,{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:f(e.poster?.width,e.poster?.height)||`2/3`,getResizedImageUrl:i,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:r||c(`It's yours!`,{shortKey:`thank_you_header_text`})}),(0,g.jsx)(`p`,{className:`text-noninteractive-content-primary-content type-subtitle2`,children:a||c(`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:n})})]})})})};export{_ as ButtonPanel,v as default};