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]=`a16a041a-a87e-490e-b89d-25610e7705bf`,e._sentryDebugIdIdentifier=`sentry-dbid-a16a041a-a87e-490e-b89d-25610e7705bf`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Fg as n,Ig as r,Wn as i,ch as a,eh as o,hn as s,lh as c}from"./entry.client-dr7r6s9a.js";import{ur as l,vr as u}from"./xds-icons-d7khcnpi.js";import{n as d}from"./purchasePageReadyUtils-n2r38x2a.js";import{t as f}from"./NarrowPurchaseShell-lkyxvfta.js";import{n as p}from"./Loading-cr26kvvh.js";var m=n(),h=e(r(),1),g=t(),_=e=>{let t=(0,m.c)(41),{trackAppAction:n}=a(),{t:r}=c(`PurchaseAskAParent`),{locCancel:_}=o();d(e.onPurchasePageReady);let v,y;t[0]===e.timeToInteractiveSpan?(v=t[1],y=t[2]):(v=()=>{e.timeToInteractiveSpan?.end()},y=[e.timeToInteractiveSpan],t[0]=e.timeToInteractiveSpan,t[1]=v,t[2]=y),(0,h.useEffect)(v,y);let b,x;if(t[3]!==n||t[4]!==e.productId||t[5]!==e.canAskParent||t[6]!==e.canRedeemGiftCard?(b=()=>{n(`ShowPurchaseAskAParent`,{productId:e.productId,canAskAParent:e.canAskParent,canRedeemGiftCard:e.canRedeemGiftCard},{location:`AskAParent`})},x=[n,e.productId,e.canAskParent,e.canRedeemGiftCard],t[3]=n,t[4]=e.productId,t[5]=e.canAskParent,t[6]=e.canRedeemGiftCard,t[7]=b,t[8]=x):(b=t[7],x=t[8]),(0,h.useEffect)(b,x),(e.canAskParent||e.canRedeemGiftCard)&&e.status!==`Ready`){let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,g.jsx)(f,{children:(0,g.jsx)(p,{})}),t[9]=e):e=t[9],e}let S;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,g.jsx)(`div`,{className:`pointer-events-none absolute end-0 start-0 top-0 z-10 h-24 bg-gradient-to-b from-white/20 to-transparent`}),t[10]=S):S=t[10];let C;t[11]===e.header?C=t[12]:(C=(0,g.jsx)(`h1`,{className:`mb-layout-vertical-title-and-row-regular text-noninteractive-content-primary-content type-section3`,children:e.header}),t[11]=e.header,t[12]=C);let w;t[13]===e.message?w=t[14]:(w=(0,g.jsx)(`p`,{className:`text-noninteractive-content-primary-content type-subtitle2`,children:e.message}),t[13]=e.message,t[14]=w);let T;t[15]===e.extraMessage?T=t[16]:(T=!!e.extraMessage&&(0,g.jsx)(`p`,{className:`text-noninteractive-content-primary-content type-subtitle2`,children:e.extraMessage}),t[15]=e.extraMessage,t[16]=T);let E;t[17]!==C||t[18]!==w||t[19]!==T?(E=(0,g.jsxs)(`div`,{className:`m-layout-vertical-related-content-in-a-section-tight`,children:[C,w,T]}),t[17]=C,t[18]=w,t[19]=T,t[20]=E):E=t[20];let D;t[21]!==e||t[22]!==r?(D=e.canAskParent&&(0,g.jsx)(s,{className:`mb-layout-vertical-related-content-in-a-section-tight w-full`,as:`button`,onPress:()=>e.status===`Ready`&&e.ask(),children:(0,g.jsxs)(`div`,{className:`inline-flex w-full items-center justify-start p-[2px]`,children:[(0,g.jsx)(`div`,{className:`inline-flex`,children:(0,g.jsx)(`p`,{className:`mx-internal-gap-tight type-subtitle2`,children:r(`Send a request`,{shortKey:`send_a_request`})})}),(0,g.jsx)(`div`,{className:`inline-flex w-full justify-end`,children:(0,g.jsx)(i,{size:`title1`,icon:(0,g.jsx)(l,{})})})]})}),t[21]=e,t[22]=r,t[23]=D):D=t[23];let O;t[24]!==e||t[25]!==r?(O=e.canRedeemGiftCard&&(0,g.jsx)(s,{className:`mb-layout-vertical-related-content-in-a-section-tight w-full`,as:`button`,onPress:()=>e.status===`Ready`&&e.redeem(),children:(0,g.jsxs)(`div`,{className:`inline-flex w-full items-center justify-start p-[2px]`,children:[(0,g.jsx)(i,{size:`title1`,icon:(0,g.jsx)(u,{})}),(0,g.jsx)(`div`,{className:`inline-flex`,children:(0,g.jsx)(`p`,{className:`mx-internal-gap-tight type-subtitle2`,children:r(`Redeem gift card`,{shortKey:`redeem_gift_card`})})}),(0,g.jsx)(`div`,{className:`inline-flex w-full justify-end`,children:(0,g.jsx)(i,{size:`title1`,icon:(0,g.jsx)(l,{})})})]})}),t[24]=e,t[25]=r,t[26]=O):O=t[26];let k;t[27]!==D||t[28]!==O?(k=(0,g.jsxs)(`div`,{className:`grow`,children:[D,O]}),t[27]=D,t[28]=O,t[29]=k):k=t[29];let A=e.exit,j;t[30]===_?j=t[31]:(j=_(),t[30]=_,t[31]=j);let M;t[32]!==e.exit||t[33]!==j?(M=(0,g.jsx)(s,{as:`button`,kind:`standard`,onPress:A,size:`standard`,className:`w-full px-6 py-4`,children:j}),t[32]=e.exit,t[33]=j,t[34]=M):M=t[34];let N;t[35]!==k||t[36]!==M?(N=(0,g.jsxs)(`div`,{className:`m-layout-vertical-related-content-in-a-section-tight flex grow flex-col`,children:[k,M]}),t[35]=k,t[36]=M,t[37]=N):N=t[37];let P;return t[38]!==E||t[39]!==N?(P=(0,g.jsx)(f,{children:(0,g.jsxs)(`div`,{className:`backdrop-blur-4xl relative flex h-full flex-col bg-container-backgrounds-overlay-scrim-extra-thin`,children:[S,E,N]})}),t[38]=E,t[39]=N,t[40]=P):P=t[40],P};export{_ as default};