const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lottie-k9kozhz5.js","assets/rolldown-runtime-nx40z1zs.js","assets/entry.client-mpghtlrl.js","assets/animation-data-m0xmi7o6.js"])))=>i.map(i=>d[i]);
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]=`95cc3ae5-7ef6-4d03-9cdc-1c46830c2c4a`,e._sentryDebugIdIdentifier=`sentry-dbid-95cc3ae5-7ef6-4d03-9cdc-1c46830c2c4a`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,Hm as r,Lh as i,Oi as a,Qh as o,Yh as s,Zm as c,jg as l,ng as u,pi as d,qh as f,xr as p,yg as m,yt as h}from"./entry.client-mpghtlrl.js";import{t as g}from"./DialogShell-ga7ic6wy.js";import{t as _}from"./useGameStreamDialogContext-orgnly77.js";var v=e(l(),1),y=e(d(),1),b=n(),x=u(),S=e=>{let t=(0,b.c)(5),{onGoHome:n}=e,{locGoHome:i}=r(),a;t[0]===i?a=t[1]:(a=i(),t[0]=i,t[1]=a);let o=a,s;return t[2]!==n||t[3]!==o?(s=(0,x.jsx)(p,{as:`button`,kind:`brand`,size:`standard`,className:`flex items-start gap-layout-vertical-title-and-row-regular self-stretch`,onPress:n,children:o}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s},C=class{static preload(){return Promise.all([i(()=>import(`./lottie-k9kozhz5.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1,2])),i(()=>import(`./animation-data-m0xmi7o6.js`),__vite__mapDeps([3,1,2]))])}_isInitialized=!1;get isInitialized(){return this._isInitialized}async initialize(t){this.destroy(),this._isInitialized=!0;let[{default:n},{default:r}]=await Promise.all([i(()=>import(`./lottie-k9kozhz5.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1,2])),i(()=>import(`./animation-data-m0xmi7o6.js`),__vite__mapDeps([3,1,2]))]);this._isInitialized!==!1&&(this.animation=n.loadAnimation({container:t,renderer:`svg`,loop:!0,autoplay:!0,animationData:r,rendererSettings:{clearCanvas:!0,preserveAspectRatio:`xMidYMid slice`}}))}destroy(){this.animation?.destroy(),this.animation=void 0,this._isInitialized=!1}};function w(){let e=(0,b.c)(3),t=(0,v.useRef)(null),n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=()=>{if(t.current==null)throw Error(`Required ref 'animationContainerRef' was not assigned a value`);let e=new C;return e.initialize(t.current).catch(e=>{let t=f(e);new m(`GameStream/ReconnectScreen/SpinnerAnimation`).error(`Failed to initialize the LottieSpinnerAnimation`,t)}),()=>{e.destroy()}},r=[],e[0]=n,e[1]=r):(n=e[0],r=e[1]),(0,v.useEffect)(n,r);let i;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,x.jsx)(`div`,{className:`h-[48px] w-[48px] self-center`,ref:t}),e[2]=i):i=e[2],i}var T=({onGoHome:e})=>{let{t:n}=t(`ReconnectDialog`),r=n(`Trying to reconnect`,{shortKey:`reconnect_trying_394384`}),i=n(`We're unable to connect with the server. Please check your internet connection.`,{shortKey:`connection_internet_conn_82bd25`}),a={title:{text:r,sizeClassName:`type-section3`},containerClassName:(0,y.default)(`items-start self-stretch`,`ps-template-overlays-modal-container-padding-2-left-&-right`,`py-internal-gap-regular`,`pe-internal-gap-regular`)},{setDialogShellProps:o}=_(),s={accessibleTitle:r,accessibleDescription:i,dismissable:!1,className:h(`w-template-overlays-modal-size-small-width-compact`,`h-[272px] sm-20:h-[248px]`,`density-low:(sm-25:h-[366px] xl-10:h-[414px])`,`density-high:sm-25:h-[288px]`,`rounded-lg bg-container-backgrounds-elevation-background-level-2`)};return(0,v.useEffect)(()=>{o(s)},[s,o]),(0,x.jsxs)(`div`,{className:(0,y.default)(`flex flex-col items-center justify-center`,`pb-template-overlays-modal-container-padding-2-top-&-bottom`),children:[(0,x.jsx)(g.NavigationHeader,{title:a}),(0,x.jsx)(g.ScrollContainer,{className:(0,y.default)(`flex flex-col items-start self-stretch sbar`,`pt-0`,`px-template-overlays-modal-container-padding-2-left-&-right`),children:(0,x.jsxs)(`div`,{className:`flex flex-col items-center gap-layout-vertical-related-content-in-a-section-tight self-stretch`,children:[(0,x.jsx)(`div`,{className:`flex items-start self-stretch`,children:(0,x.jsx)(`div`,{className:`flex items-center bg-noninteractive-content-secondary-background text-noninteractive-content-secondary-content`,children:i})}),(0,x.jsx)(w,{}),(0,x.jsx)(`div`,{className:`flex items-start gap-layout-vertical-title-and-row-regular self-stretch`,children:(0,x.jsx)(`div`,{className:`flex flex-shrink-0 flex-grow basis-0 items-start justify-between`,children:(0,x.jsx)(`div`,{className:`flex flex-shrink-0 flex-grow basis-0 flex-col items-start gap-layout-vertical-group-of-items-regular`,children:(0,x.jsx)(S,{onGoHome:e})})})})]})})]})},E=a(()=>{let{gameStream:e,dialog:t}=c(),{data:n}=o(e.queries.instance.getOptions()),{mutate:r}=s(t.mutations.goBack);return(0,x.jsx)(T,{onGoHome:()=>{n?.shutdownSession(),r()}})},`ReconnectDialog`);export{T as PureReconnectDialog,E as ReconnectDialog,E as default,S as t};