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]=`a826ede8-0409-4d1f-9e08-e6438fa3cb00`,e._sentryDebugIdIdentifier=`sentry-dbid-a826ede8-0409-4d1f-9e08-e6438fa3cb00`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Dp as n,Ep as r,Fg as i,U as a,X as o,Z as s,dn as c,dr as l,hn as u,or as d}from"./entry.client-dr7r6s9a.js";import{t as f}from"./usePlanPickerProps-kd3toy2t.js";import{n as p}from"./DialogShell-k2jpaw9r.js";import{t as m}from"./useDuetDialogStrings-kqmo6gxw.js";import{t as h}from"./PostStreamUpsell-bhkh2447.js";var g=e(d(),1),_=i(),v=t(),y=c(e=>{let t=(0,_.c)(13),{primaryProductId:n,onViewPlansPress:r}=e,{locLookingForMore:i,locXGPPComesWith:a,locJoinGamePass:o,locViewPlans:s}=m(),c=h.useComponent(),l;t[0]===i?l=t[1]:(l=i(),t[0]=i,t[1]=l);let d=l,f=`${a()} ${o()}`,p;t[2]===s?p=t[3]:(p=s(),t[2]=s,t[3]=p);let g;t[4]!==r||t[5]!==p?(g=[(0,v.jsx)(u,{as:`button`,kind:`brand`,className:`max-w-[var(--V1UO)]`,onPress:r,"data-auto-focus":!0,children:p},`viewPlans`)],t[4]=r,t[5]=p,t[6]=g):g=t[6];let y=g,b;return t[7]!==c||t[8]!==d||t[9]!==f||t[10]!==n||t[11]!==y?(b=(0,v.jsx)(c,{title:d,description:f,primaryProductId:n,actionButtons:y}),t[7]=c,t[8]=d,t[9]=f,t[10]=n,t[11]=y,t[12]=b):b=t[12],b},({productId:e})=>{if(!e)throw new r(`productId`,n.Missing);let t=s({location:`DuetPostUpsell`}),i=f(e);return{primaryProductId:e,onViewPlansPress:()=>{t({key:o.subscriptionPlanPicker.fullPath,props:i})}}}),b=(0,g.default)(`bg-container-backgrounds-elevation-background-level-2`),x=a(b,`w-component-upsell-modal-modal-width-hd`,`modal-generic`,`modal-floating`),S=a(b,`h-full`,`w-full`),C=e=>{let t=(0,_.c)(8),{productId:n,onClose:r}=e,i=l()===`high`,a=y.useComponent(),o=p.useComponent(),s=i?x:S,c;t[0]!==a||t[1]!==n?(c=(0,v.jsx)(a,{productId:n}),t[0]=a,t[1]=n,t[2]=c):c=t[2];let u;return t[3]!==o||t[4]!==s||t[5]!==r||t[6]!==c?(u=(0,v.jsx)(o,{className:s,dismissable:!0,dimBackground:!0,autoHeight:!0,onWillClose:r,children:c}),t[3]=o,t[4]=s,t[5]=r,t[6]=c,t[7]=u):u=t[7],u};export{C as DuetPostUpsellDialog,C as default};