import{u,y as h,j as s,d as i,N as l,L as d}from"./index-lOezWVmi.js";const m=()=>{var a,t;const{isAuthenticated:o,isAuthLoading:c}=u(),{data:e}=h(),r=(a=e==null?void 0:e.auth_methods)==null?void 0:a.includes("oidc"),n=((t=e==null?void 0:e.config)==null?void 0:t["user.ui.sso_only"])=="true";return c?s.jsx(i.Spinner,{className:"u-loader",text:"Loading resources..."}):o?s.jsx(l,{to:"/ui",replace:!0}):s.jsx(s.Fragment,{children:s.jsx(i.CustomLayout,{children:s.jsxs("div",{className:"empty-state login-page",children:[s.jsx("h1",{className:"p-heading--4 u-sv-2",children:"Login"}),s.jsxs(s.Fragment,{children:[!n&&s.jsx("p",{className:"u-sv1",children:"Choose your login method"}),s.jsxs("div",{className:"auth-container",children:[r&&s.jsxs("a",{className:"p-button--positive has-icon",href:"/oidc/login",children:[s.jsx(i.Icon,{name:"security",light:!0}),s.jsx("span",{children:"Login with SSO"})]}),!n&&s.jsx(s.Fragment,{children:s.jsxs(d,{className:"has-icon p-button",to:"/ui/login/certificate-generate",children:[s.jsx(i.Icon,{name:"certificate"}),s.jsx("span",{children:"Login with TLS"})]})})]})]})]})})})};export{m as default};
