import{n as e,s as t}from"./rolldown-runtime-Czos8NxU.js";import{El as n,K as r,Rt as i,Tl as a,W as o,Xs as s,cl as c,ec as l,el as u,ml as d,nl as f,tc as p,vl as m,zt as h}from"./app-initial~app-main~worktree-init-v2-page~appgen-settings-page~page~appgen-publication-ter~fzo5ij6p-BKVLyD1q.js";import{Gu as g,Wu as _}from"./app-initial~app-main~onboarding-page-CNHnOMz8.js";import{Nt as v,Pt as y,Qs as b,Rs as x,ji as S,ki as C}from"./app-initial~app-main~new-thread-panel-page-BZHGOlMi.js";import{a as w,d as T,r as E,u as D}from"./codex-mobile-setup-dialog-BgrkN-R2.js";import{a as O,i as k,n as A,r as j,t as M}from"./codex-mobile-setup-flow-DhjsgVYp.js";function N(){let e=(0,F.c)(8),t=p(i),n=l(S,r),[a]=f(D),o;e[0]===t?o=e[1]:(o=v(t),e[0]=t,e[1]=o);let{data:s,isError:c,isFetching:u,isPending:m}=d(o);if(m||n==null)return null;let h;return e[2]!==c||e[3]!==u||e[4]!==s||e[5]!==n.status||e[6]!==a?(h=(0,L.jsx)(P,{isMfaSetupRequiredError:c,isMfaSetupRequiredFetching:u,mfaSetupRequired:s,remoteControlStatus:n.status,setupStepDebugOverride:a}),e[2]=c,e[3]=u,e[4]=s,e[5]=n.status,e[6]=a,e[7]=h):h=e[7],h}function P(e){let t=(0,F.c)(13),{isMfaSetupRequiredError:n,isMfaSetupRequiredFetching:r,mfaSetupRequired:i,remoteControlStatus:a,setupStepDebugOverride:o}=e,s=b(),[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)(_.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)(_.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=a(),c(),u(),s(),I=t(n(),1),x(),C(),g(),h(),o(),T(),A(),y(),k(),w(),L=m()}))();export{N as CodexMobilePage};
//# sourceMappingURL=codex-mobile-page-CQtPwO3f.js.map