import{n as e,s as t}from"./rolldown-runtime-BG2f4sTM.js";import{D as n,E as r,Mt as i,b as a,dn as o,kt as s,un as c,x as l,y as u,zt as d}from"./app-initial~avatarOverlayCompositionSurface~index-9fQ9wihu~index-BFCcxPM5~mapbox-gl-DVWlwqb~kppdhley-CabsBVhy.js";import{Fl as f,xl as p}from"./app-initial~avatarOverlayCompositionSurface~artifact-tab-content.electron~notebook-preview-~ngwudnyz-D_QFwR2V.js";import{i as m,n as h}from"./app-initial~avatarOverlayCompositionSurface~artifact-tab-content.electron~notebook-preview-~g8980z4e-CwatHxhA.js";import{n as g,t as _}from"./app-initial~avatarOverlayCompositionSurface~artifact-tab-content.electron~app-main~appgen-s~j5d6n91g-CY67lkbg.js";import{Jn as v,Kn as y}from"./app-initial~artifact-tab-content.electron~notebook-preview-panel~app-main~business-checkout~oxnpxkxc-CRvN_72X.js";import{Q as b,mt as x}from"./app-initial~artifact-tab-content.electron~notebook-preview-panel~app-main~business-checkout~c1u3yp5s-gStRzqf8.js";import{nt as S,rt as C}from"./app-initial~artifact-tab-content.electron~notebook-preview-panel~app-main~business-checkout~djgpmkub-ChOMBY7z.js";import{a as w,d as T,r as E,u as D}from"./codex-mobile-setup-dialog-Bji-kkFY.js";import{a as O,i as k,n as A,r as j,t as M}from"./codex-mobile-setup-flow-pKUGb8wW.js";function N(){let e=(0,F.c)(8),t=n(u),a=r(v,m),[o]=i(D),s;e[0]===t?s=e[1]:(s=S(t),e[0]=t,e[1]=s);let{data:c,isError:l,isFetching:d,isPending:p}=f(s);if(p||a==null)return null;let h;return e[2]!==l||e[3]!==d||e[4]!==c||e[5]!==a.status||e[6]!==o?(h=(0,L.jsx)(P,{isMfaSetupRequiredError:l,isMfaSetupRequiredFetching:d,mfaSetupRequired:c,remoteControlStatus:a.status,setupStepDebugOverride:o}),e[2]=l,e[3]=d,e[4]=c,e[5]=a.status,e[6]=o,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=x(),[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=c(),p(),s(),l(),I=t(o(),1),b(),y(),g(),a(),h(),T(),A(),C(),k(),w(),L=d()}))();export{N as CodexMobilePage};
//# sourceMappingURL=codex-mobile-page-DRO4UF8B.js.map