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]=`17358a35-0349-44f8-b897-499a135befed`,e._sentryDebugIdIdentifier=`sentry-dbid-17358a35-0349-44f8-b897-499a135befed`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Fg as n,Ig as r,ch as i,dn as a,eh as o,lh as s,mr as c,sh as l,wg as u}from"./entry.client-dr7r6s9a.js";import{t as d}from"./useGameStreamDialogContext-ivl0rv5q.js";import{s as f}from"./PureInStreamConfirmationDialog.styles-f9kkr64u.js";import{t as p}from"./PureInStreamConfirmationDialog-ivf23uic.js";var m=e(r(),1),h=n(),g=e=>{let t=(0,h.c)(5),{t:n}=s(`DisconnectWarning`);if(e===void 0||e<0){let e;return t[0]===n?e=t[1]:(e=n(`The server you're playing on needs to be shut down for maintenance.`,{shortKey:`disconnectwarning_maintenance_playing_serv_46241c`}),t[0]=n,t[1]=e),e}let r;return t[2]!==e||t[3]!==n?(r=n(`{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`}),t[2]=e,t[3]=n,t[4]=r):r=t[4],r},_=t(),v=a(p,({timeUntilDisconnectSeconds:e})=>{let{trackAppAction:t}=i();(0,m.useEffect)(()=>{t(`DisconnectWarning`,{timeUntilDisconnectSeconds:e},{location:`DisconnectWarning`})},[e,t]);let{t:n}=s(`DisconnectWarning`),{dialog:r}=l(),{mutate:a}=u(r.mutations.goBack),c=(0,m.useCallback)(()=>{a()},[a]),{locOkay:p}=o(),h={label:p(),onPress:c,kind:`destructive`,size:`standard`,as:`button`},_=n(`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=c(()=>(0,_.jsx)(v.useComponent(),{}),`DisconnectWarningDialog`);export{v as DisconnectWarningConnection,y as DisconnectWarningDialog,y as default};