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]=`889a892f-0190-4c2e-a20b-898cab045cdb`,e._sentryDebugIdIdentifier=`sentry-dbid-889a892f-0190-4c2e-a20b-898cab045cdb`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{t}from"./useIntraDialogHistory-jdzxwi77.js";import{t as n}from"./useLocation-fu2554ly.js";import{Ag as r,Fg as i,Gn as a,Gp as o,Ig as s,Up as c,ft as l,hs as u,or as d}from"./entry.client-dr7r6s9a.js";import{t as f}from"./ShellUIContext-mh617n44.js";import{r as p}from"./ControllerPairingContext-lndsofbd.js";import{t as m}from"./controllerPairingRouteBindings-b89rfn3x.js";import{a as h,c as g,o as _}from"./routes-cum86uu1.js";import{t as v}from"./usePrevious-launn218.js";import{t as y}from"./DialogShell-k2jpaw9r.js";import{l as b}from"./Styles-pe7l89m3.js";import{t as x}from"./useShouldUseDialogNavigation-m43o5g92.js";import"./getControllerPairingRouterEnvironment-cyamx6ev.js";var S=e(s(),1),C=e(d(),1),w=i(),T=r(),E=()=>{let e=(0,w.c)(6),r=x(),{index:i}=t(),o=n().pathname===_.path,{fullscreen:s}=p();if(!r||s)return null;let c;e[0]===s?c=e[1]:(c=b(s),e[0]=s,e[1]=c);let l=i>0&&!o&&r,u;return e[2]!==c||e[3]!==l||e[4]!==r?(u=(0,T.jsx)(a,{onDown:D,children:(0,T.jsx)(y.NavigationHeader,{className:c,showBack:l,showClose:r})}),e[2]=c,e[3]=l,e[4]=r,e[5]=u):u=e[5],u};function D(){return u(!0),!0}var O=e=>{let t=(0,w.c)(6),n=(0,S.useId)(),r=(0,S.useContext)(f),i=r?.addSuppression,a=r?.removeSuppression,o,s;t[0]!==i||t[1]!==a||t[2]!==n||t[3]!==e?(o=()=>{if(!(!i||!a))return i(n,e),()=>{a(n)}},s=[n,e,i,a],t[0]=i,t[1]=a,t[2]=n,t[3]=e,t[4]=o,t[5]=s):(o=t[4],s=t[5]),(0,S.useEffect)(o,s)},k=[],A=[`top-nav`,`dock-nav`,`bottom-nav`,`accelerators`,`page-padding`,`uhf-footer`],j=()=>{let{navigationContext:e,fullscreen:t}=p();return O(e===`page`||t&&e!==`dialog`?A:k),null},M=()=>{let e=(0,w.c)(20),{fullscreen:t}=p(),r=n(),i=v(r),o;e[0]!==i||e[1]!==r.pathname?(o=()=>{if(i&&r.pathname===i.pathname)return;let e=setTimeout(()=>{u()},100);return()=>clearTimeout(e)},e[0]=i,e[1]=r.pathname,e[2]=o):o=e[2];let s;e[3]!==r||e[4]!==i?(s=[r,i],e[3]=r,e[4]=i,e[5]=s):s=e[5],(0,S.useEffect)(o,s);let d=!t,f;e[6]!==t||e[7]!==d?(f=(0,C.default)({"!h-full !w-full":t,"flex min-h-0 !w-full grow flex-col":d}),e[6]=t,e[7]=d,e[8]=f):f=e[8];let m,h;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,T.jsx)(j,{}),h=(0,T.jsx)(E,{}),e[9]=m,e[10]=h):(m=e[9],h=e[10]);let g=t?`!flex !h-full !flex-col items-start gap-layout-vertical-related-content-in-a-section-loose self-stretch bg-container-backgrounds-elevation-background-level-4 bg-cover`:``,_=t?``:`flex min-h-0 flex-1 flex-col overflow-hidden`,y;e[11]!==g||e[12]!==_?(y=(0,C.default)(g,_),e[11]=g,e[12]=_,e[13]=y):y=e[13];let b;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,T.jsx)(S.Suspense,{fallback:(0,T.jsx)(`div`,{}),children:(0,T.jsx)(c,{})}),e[14]=b):b=e[14];let x;e[15]===y?x=e[16]:(x=(0,T.jsx)(a,{"data-auto-focus":!0,onUp:N,className:y,children:b}),e[15]=y,e[16]=x);let D;return e[17]!==f||e[18]!==x?(D=(0,T.jsx)(l,{children:(0,T.jsxs)(`div`,{className:f,children:[m,h,x]})}),e[17]=f,e[18]=x,e[19]=D):D=e[19],D};function N(){return!1}m();var P=()=>{let e=(0,w.c)(12),{isFireOS:t,isKepler:n,initialPath:r,fullscreen:i}=p(),a=t===void 0?!1:t,s=n===void 0?!1:n,c=o(),l,u;e[0]!==r||e[1]!==a||e[2]!==s||e[3]!==c?(l=()=>{c({to:r||(a||s?g.getLink():h.getLink()),replace:!0})},u=[c,a,s,r],e[0]=r,e[1]=a,e[2]=s,e[3]=c,e[4]=l,e[5]=u):(l=e[4],u=e[5]),(0,S.useEffect)(l,u);let d=!i,f;e[6]!==i||e[7]!==d?(f=(0,C.default)(`flex h-full flex-col overflow-x-hidden bg-container-backgrounds-elevation-background-level-4 bg-cover`,{"h-full w-full gap-layout-vertical-related-content-in-a-section-loose px-[120px] pb-[120px] pt-[200px]":i,"modal-xsl-expanded min-h-0 !w-full grow":d}),e[6]=i,e[7]=d,e[8]=f):f=e[8];let m;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,T.jsx)(M,{}),e[9]=m):m=e[9];let _;return e[10]===f?_=e[11]:(_=(0,T.jsx)(`div`,{className:f,children:m}),e[10]=f,e[11]=_),_};export{P as ControllerPairingDialogContent};