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]=`306c0faa-8f61-4ff1-9e87-3d420cf28435`,e._sentryDebugIdIdentifier=`sentry-dbid-306c0faa-8f61-4ff1-9e87-3d420cf28435`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{$d as t,Ag as n,Dp as r,Ep as i,Fg as a,U as o,Z as s,dn as c,dr as l,hn as u,lh as d,or as f,sh as p,st as m,wg as h}from"./entry.client-dr7r6s9a.js";import{t as g}from"./usePlanPickerProps-kd3toy2t.js";import{n as _}from"./DialogShell-k2jpaw9r.js";import{t as v}from"./PostStreamUpsell-bhkh2447.js";var y=e(f(),1),b=a(),x=n(),S=c(e=>{let t=(0,b.c)(23),{primaryProductId:n,handleGetGamePassPress:r,handleSeeGameDetailsPress:i}=e,{t:a}=d(`FresnoPostStreamUpsellDialog`),o=v.useComponent(),s;t[0]===a?s=t[1]:(s=a(`Less waiting. More playing.`,{shortKey:`dialog_title_fresno`}),t[0]=a,t[1]=s);let c=s,l;t[2]===a?l=t[3]:(l=a(`Get unlimited cloud gaming and shorter wait times with Xbox Game Pass`,{shortKey:`dialog_subtitle_fresno`}),t[2]=a,t[3]=l);let f=l,p;t[4]===a?p=t[5]:(p=a(`Get Game Pass`,{shortKey:`game_pass_get_3ac630`}),t[4]=a,t[5]=p);let m;t[6]!==r||t[7]!==p?(m=(0,x.jsx)(u,{as:`button`,kind:`brand`,className:`max-w-[var(--V1UO)]`,onPress:r,children:p},`getGamePass`),t[6]=r,t[7]=p,t[8]=m):m=t[8];let h;t[9]===a?h=t[10]:(h=a(`See Game Details`,{shortKey:`see_game_details_16739a`}),t[9]=a,t[10]=h);let g;t[11]!==i||t[12]!==h?(g=(0,x.jsx)(u,{as:`button`,className:`max-w-[var(--V1UO)]`,kind:`standard`,onPress:i,children:h},`seeGameDetails`),t[11]=i,t[12]=h,t[13]=g):g=t[13];let _;t[14]!==m||t[15]!==g?(_=[m,g],t[14]=m,t[15]=g,t[16]=_):_=t[16];let y=_,S;return t[17]!==o||t[18]!==c||t[19]!==f||t[20]!==n||t[21]!==y?(S=(0,x.jsx)(o,{title:c,description:f,primaryProductId:n,actionButtons:y}),t[17]=o,t[18]=c,t[19]=f,t[20]=n,t[21]=y,t[22]=S):S=t[22],S},({productId:e})=>{if(!e)throw new i(`productId`,r.Missing);let{dialog:{mutations:n,keys:a}}=p(),o=m(),{mutate:c}=h(n.goBack.getOptions()),l=s({location:`FresnoPostStreamUpsell`}),u=()=>{o(t.products.byProductId.$buildPath({params:{productId:e}}))},d=g(e);return{primaryProductId:e,handleSeeGameDetailsPress:u,handleGetGamePassPress:()=>{c(),l({key:a.subscriptionPlanPicker.fullPath,props:d})}}}),C=(0,y.default)(`bg-container-backgrounds-elevation-background-level-2`),w=o(C,`w-component-upsell-modal-modal-width-hd`,`modal-generic`,`modal-floating`),T=o(C,`h-full`,`w-full`),E=e=>{let t=(0,b.c)(8),{productId:n,onClose:r}=e,i=l()===`high`,a=S.useComponent(),o=_.useComponent(),s=i?w:T,c;t[0]!==a||t[1]!==n?(c=(0,x.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,x.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{E as FresnoPostStreamDialog,E as default};