import{n as e,s as t}from"./rolldown-runtime-BG2f4sTM.js";import{A5 as n,Dvt as r,FQ as i,IQ as a,M_t as o,Mft as s,Mvt as c,N_t as l,Nvt as u,O_t as d,R5 as f,g3 as p,ivt as m,jft as h,lvt as g,nZ as _,ovt as v,tZ as y,v3 as b,xot as x,xvt as S,yot as C}from"./app-initial-BHB6SClA.js";import{a as w,d as T,r as E,u as D}from"./codex-mobile-setup-dialog-wx61ygV9.js";import{a as O,i as k,n as A,r as j,t as M}from"./codex-mobile-setup-flow-BsTkMuu1.js";function N(){let e=(0,F.c)(8),t=l(h),n=o(b,x),[r]=v(D),a;e[0]===t?a=e[1]:(a=i(t),e[0]=t,e[1]=a);let{data:s,isError:c,isFetching:u,isPending:d}=S(a);if(d||n==null)return null;let f;return e[2]!==c||e[3]!==u||e[4]!==s||e[5]!==n.status||e[6]!==r?(f=(0,L.jsx)(P,{isMfaSetupRequiredError:c,isMfaSetupRequiredFetching:u,mfaSetupRequired:s,remoteControlStatus:n.status,setupStepDebugOverride:r}),e[2]=c,e[3]=u,e[4]=s,e[5]=n.status,e[6]=r,e[7]=f):f=e[7],f}function P(e){let t=(0,F.c)(13),{isMfaSetupRequiredError:n,isMfaSetupRequiredFetching:r,mfaSetupRequired:i,remoteControlStatus:a,setupStepDebugOverride:o}=e,s=f(),[c]=(0,I.useState)(a);if(r)return null;if(O({isMfaSetupRequiredError:n,mfaSetupRequired:i,initialRemoteControlStatus:c,remoteControlStatus:a,setupStepDebugOverride:o})){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(y.MainContentLayout,{layout:`full-bleed`}),t[0]=e):e=t[0];let r;t[1]!==n||t[2]!==i||t[3]!==a?(r=j({isMfaSetupRequiredError:n,mfaSetupRequired:i,remoteControlStatus:a}),t[1]=n,t[2]=i,t[3]=a,t[4]=r):r=t[4];let o;t[5]===s?o=t[6]:(o=()=>{s(`/`)},t[5]=s,t[6]=o);let c;return t[7]!==r||t[8]!==o?(c=(0,L.jsxs)(L.Fragment,{children:[e,(0,L.jsx)(M,{initialStep:r,onClose:o,variant:`page`})]}),t[7]=r,t[8]=o,t[9]=c):c=t[9],c}let l;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,L.jsx)(y.MainContentLayout,{layout:`full-bleed`}),t[10]=l):l=t[10];let u;return t[11]===s?u=t[12]:(u=(0,L.jsxs)(L.Fragment,{children:[l,(0,L.jsx)(E,{onManageConnections:()=>{s(`/settings/connections`)}})]}),t[11]=s,t[12]=u),u}var F,I,L;e((()=>{F=c(),g(),m(),d(),I=t(u(),1),n(),p(),_(),s(),C(),T(),A(),a(),k(),w(),L=r()}))();export{N as CodexMobilePage};
//# sourceMappingURL=codex-mobile-page-URgC55PW.js.map