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]=`0b64de8a-08b5-4748-b4aa-a9bd376559a7`,e._sentryDebugIdIdentifier=`sentry-dbid-0b64de8a-08b5-4748-b4aa-a9bd376559a7`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Fr as n,Tr as r,_r as i,gi as a,hi as o,jg as s,ng as c,op as l,pi as u}from"./entry.client-mpghtlrl.js";import{ft as d}from"./xds-react-components-ihgca01z.js";import{n as f}from"./auth-hooks-dkb6uyrd.js";import{i as p,n as m,t as h}from"./ControllerPairingContext-g12j6fyu.js";import{r as g}from"./DialogShell-ga7ic6wy.js";var _=t(),v=e(u(),1),y=e(s(),1),b=c(),x=i(e=>{let t=(0,_.c)(25),i,s,c,u,f;t[0]===e?(i=t[1],s=t[2],c=t[3],u=t[4],f=t[5]):({children:f,onClosed:u,navigationContext:i,isTV:s,...c}=e,t[0]=e,t[1]=i,t[2]=s,t[3]=c,t[4]=u,t[5]=f);let p=m(i,s),[x,S]=(0,y.useState)(),C=(0,y.useRef)(null),w=(0,y.useRef)(null),T=a(),E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E={edge:`bottom`,centered:!0},t[6]=E):E=t[6];let D=d(E),O;t[7]===D?O=t[8]:(O=n(D),t[7]=D,t[8]=O);let k=O,A;t[9]===C?A=t[10]:(A={targetRef:w,overlayRef:C,placement:`top end`,mainAxisOffset:8},t[9]=C,t[10]=A);let{recalculatePosition:j}=r(A),M;t[11]===j?M=t[12]:(M=()=>{j()},t[11]=j,t[12]=M);let N;t[13]!==T||t[14]!==j?(N=[T,j],t[13]=T,t[14]=j,t[15]=N):N=t[15],(0,y.useEffect)(M,N);let P;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(P={default:!0,SM_10:!1},t[16]=P):P=t[16];let{data:F}=o(P),I=p?void 0:F?k:void 0,L=g,R=l,z=(0,v.default)(`flex flex-shrink-0 flex-col items-center`,{"fixed !inset-0 !h-dvh !max-h-none !w-dvw !max-w-none !rounded-none":p,"modal-large bg-container-backgrounds-elevation-background-level-4":!p,"sm-10:!h-template-overlays-modal-size-large-height-centered xsl-10:!h-dvh xsl-20:!h-dvh":!p,"xsl-10:!max-w-[667px] xsl-20:!max-w-[667px]":!p,"modal-floating":!F&&!p,"modal-docked":F&&!p,"![container-type:inline-size]":F}),B;return t[17]!==L||t[18]!==R.dialog.controllerPairing.fullPath||t[19]!==u||t[20]!==z||t[21]!==I||t[22]!==C||t[23]!==f?(B=(0,b.jsx)(L,{routerKey:R.dialog.controllerPairing.fullPath,onWillClose:u,dismissable:!1,className:z,positionStyle:I,containerRef:C,children:f}),t[17]=L,t[18]=R.dialog.controllerPairing.fullPath,t[19]=u,t[20]=z,t[21]=I,t[22]=C,t[23]=f,t[24]=B):B=t[24],(0,b.jsx)(h.Provider,{value:{...c,onClosed:u,navigationContext:i,isTV:s,fullscreen:p,controllerType:x,setControllerType:S},children:B})},e=>{let t=p(`dialog`,void 0,void 0,void 0,void 0),n=f({innerLocation:`ControllerPairingDialog`});return{...e,...t,onSignIn:n}}).Default;export{x as ControllerPairingDialogWrapper};