import{u as d,e as l,n as h,j as e,L as u,N as x,C as g,d as s,c as a}from"./index-3c1b2661.js";const m=()=>{var n;const{isAuthenticated:c,isAuthLoading:r}=d(),o=l(),{data:i}=h(),t=(n=i==null?void 0:i.auth_methods)==null?void 0:n.includes("oidc");return r?e.jsx(u,{}):c?e.jsx(x,{to:"/ui",replace:!0}):e.jsx(g,{children:e.jsx(s.Row,{className:"empty-state",children:e.jsxs(s.Col,{size:6,className:"col-start-large-4",children:[e.jsx(s.Icon,{name:"containers",className:"empty-state-icon lxd-icon"}),e.jsx("h1",{className:"p-heading--4 u-sv-2",children:"Login"}),t&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"u-sv1",children:"Choose your login method"}),e.jsx("a",{className:"p-button--positive",href:"/oidc/login",children:"Login with SSO"}),e.jsx("h2",{className:"p-heading--5 u-sv-2",children:"Other methods"}),e.jsxs("div",{children:["Either"," ",e.jsx(a,{to:"/ui/login/certificate-generate",children:"create a new certificate"})]}),e.jsxs("div",{children:["Or"," ",e.jsx(a,{to:"/ui/login/certificate-add",children:"use an existing certificate"})," ","already added to your browser"]})]}),!t&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"u-sv1",children:"Certificate selection"}),e.jsx(s.Button,{appearance:"positive",onClick:()=>o("/ui/login/certificate-generate"),children:"Create a new certificate"}),e.jsxs("p",{children:["Or"," ",e.jsx(a,{to:"/ui/login/certificate-add",children:"use an existing certificate"})," ","already added to your browser"]})]})]})})})};export{m as default};
