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]=`2807c472-a0f7-4ec8-8bac-5e55927cfce7`,e._sentryDebugIdIdentifier=`sentry-dbid-2807c472-a0f7-4ec8-8bac-5e55927cfce7`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{t}from"./useLocation-gval357w.js";import{$m as n,Ag as r,Hm as i,Qm as a,hh as o,ii as ee,jg as s,ng as c,sh as l,ti as u,xr as d}from"./entry.client-mpghtlrl.js";import{Qt as f}from"./workspace-leaf-files-oergw4h0.js";import{t as p}from"./Announcer-b6q4a41y.js";import{c as m,r as h}from"./ControllerPairingContext-g12j6fyu.js";import{d as te}from"./routes-dojzucd0.js";import{c as ne,t as g,u as re}from"./Styles-l5eym0go.js";import{t as ie}from"./useShouldUseDialogNavigation-hy13sydb.js";import{t as ae}from"./getControllerPairingRouterEnvironment-fiqysqef.js";import{t as oe}from"./ControllerPairingHeader-fiafpaeq.js";import{t as se}from"./useInitialFocusIn-jawaf05r.js";var ce=r(),le=e(s(),1),_=c(),v=`PairErrorPage`,y=()=>{let e=(0,ce.c)(60),{t:r}=n(`ControllerPairingPairError`),{locSkipForNow:s,locTryAgain:c,locSomethingWentWrong:y,locAccessibilityItemEnumeration:b}=i(),{nextOnboardingFlowUrl:x,controllerType:S,fullscreen:C,onClosed:w}=h(),{trackUserAction:T}=a(),E=ie(),D=ae(),O=t().state,k;e[0]!==r||e[1]!==y?(k=e=>{switch(e){case f.AnErrorOcurredWhenBonding:return r(`We couldn't pair your controller`,{shortKey:`controller_pairing_pair_error_pairing_error`});default:return y()}},e[0]=r,e[1]=y,e[2]=k):k=e[2];let A=k,j;e[3]!==A||e[4]!==O?(j=A(O),e[3]=A,e[4]=O,e[5]=j):j=e[5];let M=j,N=(0,le.useRef)(null);se(N);let P=C?`large`:`standard`,F;e[6]===C?F=e[7]:(F=re(C),e[6]=C,e[7]=F);let I;e[8]===M?I=e[9]:(I=(0,_.jsx)(oe,{title:M,isSingleColumnLayout:!0}),e[8]=M,e[9]=I);let L;e[10]===M?L=e[11]:(L=(0,_.jsx)(p,{announcements:{announcement:{text:M,priority:`polite`}}}),e[10]=M,e[11]=L);let R;e[12]===C?R=e[13]:(R=ne(C),e[12]=C,e[13]=R);let z;e[14]===S?z=e[15]:(z=m(S),e[14]=S,e[15]=z);let B;e[16]!==R||e[17]!==z?(B=(0,_.jsx)(ee,{className:R,illustration:z,size:`maxWidth`}),e[16]=R,e[17]=z,e[18]=B):B=e[18];let V;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(V=[],e[19]=V):V=e[19];let H;e[20]===D?H=e[21]:(H=()=>(D(te.path),!0),e[20]=D,e[21]=H);let U;e[22]!==c||e[23]!==b?(U=b(c(),1,2),e[22]=c,e[23]=b,e[24]=U):U=e[24];let W;e[25]===c?W=e[26]:(W=c(),e[25]=c,e[26]=W);let G;e[27]!==P||e[28]!==H||e[29]!==U||e[30]!==W?(G=(0,_.jsx)(d,{className:g.buttonSpacing,as:`button`,size:P,kind:`brand`,onPress:H,"data-auto-focus":!0,"aria-label":U,children:W}),e[27]=P,e[28]=H,e[29]=U,e[30]=W,e[31]=G):G=e[31];let K=E?`button`:`a`,q;e[32]!==E||e[33]!==w||e[34]!==T||e[35]!==x?(q=()=>{E?w?.():T(l.NavigateInApp,{destination:x??`unknown`},o.Press,{location:v})},e[32]=E,e[33]=w,e[34]=T,e[35]=x,e[36]=q):q=e[36];let J;e[37]!==s||e[38]!==b?(J=b(s(),2,2),e[37]=s,e[38]=b,e[39]=J):J=e[39];let Y;e[40]===s?Y=e[41]:(Y=s(),e[40]=s,e[41]=Y);let X;e[42]!==x||e[43]!==K||e[44]!==P||e[45]!==q||e[46]!==J||e[47]!==Y?(X=(0,_.jsx)(d,{className:g.buttonSpacing,href:x,as:K,"data-replace":`true`,size:P,kind:`standard`,onPress:q,"aria-label":J,children:Y}),e[42]=x,e[43]=K,e[44]=P,e[45]=q,e[46]=J,e[47]=Y,e[48]=X):X=e[48];let Z;e[49]!==G||e[50]!==X?(Z=(0,_.jsx)(`div`,{className:g.buttonContainer,children:(0,_.jsxs)(u,{exitDirections:V,children:[G,X]})}),e[49]=G,e[50]=X,e[51]=Z):Z=e[51];let Q;e[52]!==B||e[53]!==Z?(Q=(0,_.jsxs)(`div`,{className:g.illustrationCard,children:[B,Z]}),e[52]=B,e[53]=Z,e[54]=Q):Q=e[54];let $;return e[55]!==F||e[56]!==I||e[57]!==L||e[58]!==Q?($=(0,_.jsxs)(`div`,{className:F,ref:N,children:[I,L,Q]}),e[55]=F,e[56]=I,e[57]=L,e[58]=Q,e[59]=$):$=e[59],$};export{y as PairError};