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]=`7df76c82-9710-4bdd-821f-555ca283222b`,e._sentryDebugIdIdentifier=`sentry-dbid-7df76c82-9710-4bdd-821f-555ca283222b`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,Hm as r,Oi as i,Qm as a,Yh as o,Zm as s,_r as c,jg as l,ng as u}from"./entry.client-mpghtlrl.js";import{t as d}from"./useGameStreamDialogContext-orgnly77.js";import{s as f}from"./PureInStreamConfirmationDialog.styles-deafeydi.js";import{t as p}from"./PureInStreamConfirmationDialog-k0il2d8x.js";var m=e(l(),1),h=n(),g=e=>{let n=(0,h.c)(5),{t:r}=t(`DisconnectWarning`);if(e===void 0||e<0){let e;return n[0]===r?e=n[1]:(e=r(`The server you're playing on needs to be shut down for maintenance.`,{shortKey:`disconnectwarning_maintenance_playing_serv_46241c`}),n[0]=r,n[1]=e),e}let i;return n[2]!==e||n[3]!==r?(i=r(`{minutes, plural, =0{The server you are playing on needs to be shut down for maintenance in about 1 minute.} =1{The server you are playing on needs to be shut down for maintenance in about 1 minute.} other{The server you are playing on needs to be shut down for maintenance in about # minutes.}}`,{values:{minutes:Math.round(e/60)},shortKey:`disconnectwarning_other_18d4b7`}),n[2]=e,n[3]=r,n[4]=i):i=n[4],i},_=u(),v=c(p,({timeUntilDisconnectSeconds:e})=>{let{trackAppAction:n}=a();(0,m.useEffect)(()=>{n(`DisconnectWarning`,{timeUntilDisconnectSeconds:e},{location:`DisconnectWarning`})},[e,n]);let{t:i}=t(`DisconnectWarning`),{dialog:c}=s(),{mutate:l}=o(c.mutations.goBack),u=(0,m.useCallback)(()=>{l()},[l]),{locOkay:p}=r(),h={label:p(),onPress:u,kind:`destructive`,size:`standard`,as:`button`},_=i(`Your game will disconnect soon`,{shortKey:`disconnectwarning_disconnect_game_soon_5f31bb`}),v=g(e),{setDialogShellProps:y}=d(),b={accessibleTitle:_,accessibleDescription:v,dismissable:!1,className:f,autoHeight:!0};return(0,m.useEffect)(()=>{y(b)},[b,y]),{locTitle:_,locDescription:v,button1Props:h}}),y=i(()=>(0,_.jsx)(v.useComponent(),{}),`DisconnectWarningDialog`);export{v as DisconnectWarningConnection,y as DisconnectWarningDialog,y as default};