const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lottie-oo98t5di.js","assets/rolldown-runtime-eb2nym32.js","assets/entry.client-dr7r6s9a.js","assets/animation-data-eieehv4k.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]=`0f16c4d0-52b6-42fd-9c3b-4483a4966510`,e._sentryDebugIdIdentifier=`sentry-dbid-0f16c4d0-52b6-42fd-9c3b-4483a4966510`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Dg as n,Fg as r,Ig as i,Jh as a,U as o,eh as s,hn as c,ig as l,lh as u,mr as d,or as f,pg as p,sh as m,wg as h}from"./entry.client-dr7r6s9a.js";import{t as g}from"./DialogShell-k2jpaw9r.js";import{t as _}from"./useGameStreamDialogContext-ivl0rv5q.js";var v=e(i(),1),y=e(f(),1),b=r(),x=t(),S=e=>{let t=(0,b.c)(5),{onGoHome:n}=e,{locGoHome:r}=s(),i;t[0]===r?i=t[1]:(i=r(),t[0]=r,t[1]=i);let a=i,o;return t[2]!==n||t[3]!==a?(o=(0,x.jsx)(c,{as:`button`,kind:`brand`,size:`standard`,className:`flex items-start gap-layout-vertical-title-and-row-regular self-stretch`,onPress:n,children:a}),t[2]=n,t[3]=a,t[4]=o):o=t[4],o},C=class{static preload(){return Promise.all([a(()=>import(`./lottie-oo98t5di.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1,2])),a(()=>import(`./animation-data-eieehv4k.js`),__vite__mapDeps([3,1,2]))])}animation;_isInitialized=!1;get isInitialized(){return this._isInitialized}async initialize(t){this.destroy(),this._isInitialized=!0;let[{default:n},{default:r}]=await Promise.all([a(()=>import(`./lottie-oo98t5di.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1,2])),a(()=>import(`./animation-data-eieehv4k.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=l(e);new p(`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}=u(`ReconnectDialog`),n=t(`Trying to reconnect`,{shortKey:`reconnect_trying_394384`}),r=t(`We're unable to connect with the server. Please check your internet connection.`,{shortKey:`connection_internet_conn_82bd25`}),i={title:{text:n,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:a}=_(),s={accessibleTitle:n,accessibleDescription:r,dismissable:!1,className:o(`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)(()=>{a(s)},[s,a]),(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:i}),(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:r})}),(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=d(()=>{let{gameStream:e,dialog:t}=m(),{data:r}=n(e.queries.instance.getOptions()),{mutate:i}=h(t.mutations.goBack);return(0,x.jsx)(T,{onGoHome:()=>{r?.shutdownSession(),i()}})},`ReconnectDialog`);export{T as PureReconnectDialog,E as ReconnectDialog,E as default};