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]=`a009cb51-79e3-463c-820a-c27c01fd9f82`,e._sentryDebugIdIdentifier=`sentry-dbid-a009cb51-79e3-463c-820a-c27c01fd9f82`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,Hm as r,Oi as i,Qh 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"./useMatchMedia-darrb7je.js";import{t as f}from"./useGameStreamDialogContext-orgnly77.js";import{s as p}from"./PureInStreamConfirmationDialog.styles-deafeydi.js";import{t as m}from"./PureInStreamConfirmationDialog-k0il2d8x.js";var h=e(l(),1),g=n();function _(){let e=(0,g.c)(6),{gameStream:t}=s(),n=d(`(display-mode: fullscreen)`),r;e[0]!==n||e[1]!==t.queries.isFullscreen?(r=t.queries.isFullscreen.getOptions({isDisplayModeFullscreen:n}),e[0]=n,e[1]=t.queries.isFullscreen,e[2]=r):r=e[2];let{data:i}=a(r),{mutateAsync:c}=o(t.mutations.toggleFullscreen),l=!!i,u;return e[3]!==l||e[4]!==c?(u=[l,c],e[3]=l,e[4]=c,e[5]=u):u=e[5],u}var v=u(),y=c(m,()=>{let{t:e}=t(`ExitFullscreenDialog`),{dialog:n}=s(),{mutate:i}=o(n.mutations.goBack),[a,c]=_(),l=(0,h.useCallback)(()=>{i(),a||c()},[i,a,c]),u={label:e(`Return to fullscreen`,{shortKey:`fullscreen_return_62b2b4`}),onPress:l,kind:`brand`,size:`standard`,as:`button`},d=(0,h.useCallback)(()=>{i()},[i]),m={label:e(`Exit fullscreen`,{shortKey:`fullscreen_exit_b7c93d`}),kind:`standard`,size:`standard`,as:`button`,onPress:d},{locWarning:g}=r(),v=g(),y=e(`Exiting fullscreen mode can degrade the gameplay experience`,{shortKey:`fullscreen_experience_2f6029`}),{setDialogShellProps:b}=f(),x={accessibleTitle:v,accessibleDescription:y,dismissable:!0,className:p,autoHeight:!0};return(0,h.useEffect)(()=>{b(x)},[x,b]),{locTitle:v,locDescription:y,button1Props:u,button2Props:m}}),b=i(()=>(0,v.jsx)(y.useComponent(),{}),`ExitFullscreenDialog`);export{b as ExitFullscreenDialog,b as default,y as ExitFullscreenDialogConnection};