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]=`53091309-670d-4567-8b22-32ec4a539192`,e._sentryDebugIdIdentifier=`sentry-dbid-53091309-670d-4567-8b22-32ec4a539192`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,At as n,Ig as r,Og 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=t(),g=a(p,()=>{let{locContinueAnyway:e,locGoHome:t,locLearnMore:r}=o(),{t:a}=s(`GamepadDisconnectedDialog`),c=a(`Connect a controller`,{shortKey:`gamepaddisconnecteddialog_controller_connect_7fecc3`}),p=a(`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:c,accessibleDescription:p,dismissable:!1,className:f,autoHeight:!0};(0,m.useEffect)(()=>{h(g)},[g,h]);let{gameStream:_,capabilities:v,dialog:y}=l(),[{data:b,isLoading:x},{data:S,isLoading:C}]=i({queries:[_.queries.instance.getOptions(),v.queries.canOpenExternalLinks.getOptions()]}),{mutate:w}=u(y.mutations.goBack),T=x||C,E=(0,m.useCallback)(()=>{S?window.open(n,`_blank`):b?.shutdownSession(),w()},[b,w,S]),D=(0,m.useCallback)(()=>{b&&(b.tak.config.playerOptedIntoStandardLayoutFallback=!0),w()},[b,w]);return{locTitle:c,locDescription:p,button1Props:{label:S?r():t(),onPress:E,kind:S?`standard`:`destructive`,size:`standard`,as:`button`},button2Props:S?{label:b?.tak.config.supportsGenericTouch?a(`Continue with basic controls`,{shortKey:`gamepaddisconnecteddialog_continue_controls_basic_19c78c`}):e(),kind:`standard`,size:`standard`,as:`button`,onPress:D}:void 0,isLoading:T}}),_=c(()=>(0,h.jsx)(g.useComponent(),{}),`GamepadDisconnectedDialog`);export{_ as GamepadDisconnectedDialog,_ as default,g as GamepadDisconnectedDialogConnection};