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]=`d1724236-defd-4d8d-9c71-187c659a29b2`,e._sentryDebugIdIdentifier=`sentry-dbid-d1724236-defd-4d8d-9c71-187c659a29b2`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{t}from"./useLocation-fu2554ly.js";import{Ag as n,Fg as r,Gn as i,Ig as a,Jn as o,Kl as ee,ch as s,eh as c,gh as l,hn as u,lh as d,wh as f}from"./entry.client-dr7r6s9a.js";import{t as p}from"./Announcer-ns276d3u.js";import{c as m,r as h}from"./ControllerPairingContext-lndsofbd.js";import{d as g}from"./routes-cum86uu1.js";import{c as _,t as v,u as te}from"./Styles-pe7l89m3.js";import{t as ne}from"./useShouldUseDialogNavigation-m43o5g92.js";import{t as re}from"./getControllerPairingRouterEnvironment-cyamx6ev.js";import{t as ie}from"./ControllerPairingHeader-o5r7pkm4.js";import{t as ae}from"./useInitialFocusIn-fziws25j.js";var oe=r(),se=e(a(),1),y=n(),b=`PairErrorPage`,x=()=>{let e=(0,oe.c)(58),{t:n}=d(`ControllerPairingPairError`),{locSkipForNow:r,locTryAgain:a,locSomethingWentWrong:x,locAccessibilityItemEnumeration:S}=c(),{nextOnboardingFlowUrl:C,controllerType:w,fullscreen:T}=h(),{trackUserAction:E}=s(),D=ne(),O=re(),k=t().state,A;e[0]!==n||e[1]!==x?(A=e=>{switch(e){case ee.AnErrorOcurredWhenBonding:return n(`We couldn't pair your controller`,{shortKey:`controller_pairing_pair_error_pairing_error`});default:return x()}},e[0]=n,e[1]=x,e[2]=A):A=e[2];let j=A,M;e[3]!==j||e[4]!==k?(M=j(k),e[3]=j,e[4]=k,e[5]=M):M=e[5];let N=M,P=(0,se.useRef)(null);ae(P);let F;e[6]===T?F=e[7]:(F=te(T),e[6]=T,e[7]=F);let I;e[8]===N?I=e[9]:(I=(0,y.jsx)(ie,{title:N,isSingleColumnLayout:!0}),e[8]=N,e[9]=I);let L;e[10]===N?L=e[11]:(L=(0,y.jsx)(p,{announcements:{announcement:{text:N,priority:`polite`}}}),e[10]=N,e[11]=L);let R;e[12]===T?R=e[13]:(R=_(T),e[12]=T,e[13]=R);let z;e[14]===w?z=e[15]:(z=m(w),e[14]=w,e[15]=z);let B;e[16]!==R||e[17]!==z?(B=(0,y.jsx)(o,{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]===O?H=e[21]:(H=()=>(O(g.path),!0),e[20]=O,e[21]=H);let U;e[22]!==a||e[23]!==S?(U=S(a(),1,2),e[22]=a,e[23]=S,e[24]=U):U=e[24];let W;e[25]===a?W=e[26]:(W=a(),e[25]=a,e[26]=W);let G;e[27]!==H||e[28]!==U||e[29]!==W?(G=(0,y.jsx)(u,{className:v.buttonSpacing,as:`button`,size:`standard`,kind:`brand`,onPress:H,"data-auto-focus":!0,"aria-label":U,children:W}),e[27]=H,e[28]=U,e[29]=W,e[30]=G):G=e[30];let K=D?`button`:`a`,q;e[31]!==D||e[32]!==O||e[33]!==E||e[34]!==C?(q=()=>{D?O(-1):E(l.NavigateInApp,{destination:C??`unknown`},f.Press,{location:b})},e[31]=D,e[32]=O,e[33]=E,e[34]=C,e[35]=q):q=e[35];let J;e[36]!==r||e[37]!==S?(J=S(r(),2,2),e[36]=r,e[37]=S,e[38]=J):J=e[38];let Y;e[39]===r?Y=e[40]:(Y=r(),e[39]=r,e[40]=Y);let X;e[41]!==C||e[42]!==K||e[43]!==q||e[44]!==J||e[45]!==Y?(X=(0,y.jsx)(u,{className:v.buttonSpacing,href:C,as:K,"data-replace":`true`,size:`standard`,kind:`standard`,onPress:q,"aria-label":J,children:Y}),e[41]=C,e[42]=K,e[43]=q,e[44]=J,e[45]=Y,e[46]=X):X=e[46];let Z;e[47]!==G||e[48]!==X?(Z=(0,y.jsx)(`div`,{className:v.buttonContainer,children:(0,y.jsxs)(i,{exitDirections:V,children:[G,X]})}),e[47]=G,e[48]=X,e[49]=Z):Z=e[49];let Q;e[50]!==B||e[51]!==Z?(Q=(0,y.jsxs)(`div`,{className:v.illustrationCard,children:[B,Z]}),e[50]=B,e[51]=Z,e[52]=Q):Q=e[52];let $;return e[53]!==F||e[54]!==I||e[55]!==L||e[56]!==Q?($=(0,y.jsxs)(`div`,{className:F,ref:P,children:[I,L,Q]}),e[53]=F,e[54]=I,e[55]=L,e[56]=Q,e[57]=$):$=e[57],$};export{x as PairError};