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]=`60f5199c-12f8-41c4-9d92-8229a8f4fd0d`,e._sentryDebugIdIdentifier=`sentry-dbid-60f5199c-12f8-41c4-9d92-8229a8f4fd0d`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$h as t,$m as n,Hm as r,Mn as i,Oi 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=u(),g=c(p,()=>{let{locContinueAnyway:e,locGoHome:a,locLearnMore:c}=r(),{t:l}=n(`GamepadDisconnectedDialog`),u=l(`Connect a controller`,{shortKey:`gamepaddisconnecteddialog_controller_connect_7fecc3`}),p=l(`You need to connect a supported controller to play. Once your controller is connected, your session will resume automatically.`,{shortKey:`gamepaddisconnecteddialog_automatically_controller_3baf41`}),{setDialogShellProps:h}=d(),g={accessibleTitle:u,accessibleDescription:p,dismissable:!1,className:f,autoHeight:!0};(0,m.useEffect)(()=>{h(g)},[g,h]);let{gameStream:_,capabilities:v,dialog:y}=s(),[{data:b,isLoading:x},{data:S,isLoading:C}]=t({queries:[_.queries.instance.getOptions(),v.queries.canOpenExternalLinks.getOptions()]}),{mutate:w}=o(y.mutations.goBack),T=x||C,E=(0,m.useCallback)(()=>{S?window.open(i,`_blank`):b?.shutdownSession(),w()},[b,w,S]),D=(0,m.useCallback)(()=>{b&&(b.tak.config.playerOptedIntoStandardLayoutFallback=!0),w()},[b,w]);return{locTitle:u,locDescription:p,button1Props:{label:S?c():a(),onPress:E,kind:S?`standard`:`destructive`,size:`standard`,as:`button`},button2Props:S?{label:b?.tak.config.supportsGenericTouch?l(`Continue with basic controls`,{shortKey:`gamepaddisconnecteddialog_continue_controls_basic_19c78c`}):e(),kind:`standard`,size:`standard`,as:`button`,onPress:D}:void 0,isLoading:T}}),_=a(()=>(0,h.jsx)(g.useComponent(),{}),`GamepadDisconnectedDialog`);export{_ as GamepadDisconnectedDialog,_ as default,g as GamepadDisconnectedDialogConnection};