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]=`7f1401b0-3c9a-4a11-9653-65de689b2c2d`,e._sentryDebugIdIdentifier=`sentry-dbid-7f1401b0-3c9a-4a11-9653-65de689b2c2d`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{rt as t}from"./xds-react-components-lks62tbl.js";import{Ag as n,Dn as r,Fg as i,Ig as a,Ro as o,cr as s,dn as c,or as l,yn as u,zp as d}from"./entry.client-dr7r6s9a.js";import{n as f}from"./auth-hooks-karaxdb8.js";import{i as p,n as m,t as h}from"./ControllerPairingContext-lndsofbd.js";import{r as g}from"./DialogShell-k2jpaw9r.js";var _=i(),v=e(l(),1),y=e(a(),1),b=n(),x=c(e=>{let n=(0,_.c)(25),i,a,c,l,f;n[0]===e?(i=n[1],a=n[2],c=n[3],l=n[4],f=n[5]):({children:f,onClosed:l,navigationContext:i,isTV:a,...c}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=c,n[4]=l,n[5]=f);let p=m(i,a),[x,S]=(0,y.useState)(),C=(0,y.useRef)(null),w=(0,y.useRef)(null),T=o(),E;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(E={edge:`bottom`,centered:!0},n[6]=E):E=n[6];let D=t(E),O;n[7]===D?O=n[8]:(O=r(D),n[7]=D,n[8]=O);let k=O,A;n[9]===C?A=n[10]:(A={targetRef:w,overlayRef:C,placement:`top end`,mainAxisOffset:8},n[9]=C,n[10]=A);let{recalculatePosition:j}=u(A),M;n[11]===j?M=n[12]:(M=()=>{j()},n[11]=j,n[12]=M);let N;n[13]!==T||n[14]!==j?(N=[T,j],n[13]=T,n[14]=j,n[15]=N):N=n[15],(0,y.useEffect)(M,N);let P;n[16]===Symbol.for(`react.memo_cache_sentinel`)?(P={default:!0,SM_10:!1},n[16]=P):P=n[16];let{data:F}=s(P),I=p?void 0:F?k:void 0,L=g,R=d,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 n[17]!==L||n[18]!==R.dialog.controllerPairing.fullPath||n[19]!==l||n[20]!==z||n[21]!==I||n[22]!==C||n[23]!==f?(B=(0,b.jsx)(L,{routerKey:R.dialog.controllerPairing.fullPath,onWillClose:l,dismissable:!1,className:z,positionStyle:I,containerRef:C,children:f}),n[17]=L,n[18]=R.dialog.controllerPairing.fullPath,n[19]=l,n[20]=z,n[21]=I,n[22]=C,n[23]=f,n[24]=B):B=n[24],(0,b.jsx)(h.Provider,{value:{...c,onClosed:l,navigationContext:i,isTV:a,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};