import{a as c,u,A as h,j as s,d as e,N as l,R as t,L as d}from"./index-Dz5JRQhj.js";const x=()=>{const{isAuthenticated:a,isAuthLoading:o}=c(),{data:i}=u(),r=i?.auth_methods?.includes(h.OIDC),n=i?.config?.["user.ui.sso_only"]=="true";return o?s.jsx(e.Spinner,{className:"u-loader",text:"Loading resources..."}):a?s.jsx(l,{to:`${t}/ui`,replace:!0}):s.jsx(s.Fragment,{children:s.jsx(e.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:`${t}/oidc/login`,children:[s.jsx(e.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:`${t}/ui/login/certificate-generate`,children:[s.jsx(e.Icon,{name:"certificate"}),s.jsx("span",{children:"Login with TLS"})]})})]})]})]})})})};export{x as default};
