import{S as e}from"./antd-NNbrPHoG.js";import{r as t,s as n}from"./chunk-QFMPRPBF-ZgigjiE1.js";import{t as r}from"./react-vendor-nIJYBVRh.js";import{n as i}from"./AuthContext-Bb7tFn4r.js";var a=r();function o(){let{ready:r,authRequired:o,user:s,needsBootstrap:c}=i(),l=n();return r?o?c&&!s?(0,a.jsx)(t,{to:`/setup`,replace:!0,state:{from:l}}):s?(0,a.jsx)(t,{to:`/dashboard`,replace:!0}):(0,a.jsx)(t,{to:`/login`,replace:!0,state:{from:l}}):(0,a.jsx)(t,{to:`/dashboard`,replace:!0}):(0,a.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:`100vh`},children:(0,a.jsx)(e,{size:`large`,delay:200})})}export{o as default};