1import{u as g,r as t,s as u,j as e}from"./index-DEXYvuQG.js";function b(){const r=g(),[a,c]=t.useState(""),[n,x]=t.useState(""),[o,d]=t.useState(null),[i,l]=t.useState(!1);t.useEffect(()=>{u.auth.getUser().then(({data:s})=>{s.user&&r({to:"/admin",replace:!0})})},[r]);async function p(s){s.preventDefault(),l(!0),d(null);const{error:m}=await u.auth.signInWithPassword({email:a,password:n});if(l(!1),m){d(m.message);return}r({to:"/admin",replace:!0})}return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:e.jsxs("form",{onSubmit:p,className:"w-full max-w-sm space-y-4 rounded-lg border border-border bg-card p-8 shadow-sm",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Team sign in"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Admin access to Women in AI."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",htmlFor:"email",children:"Email"}),e.jsx("input",{id:"email",type:"email",value:a,onChange:s=>c(s.target.value),required:!0,className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",htmlFor:"password",children:"Password"}),e.jsx("input",{id:"password",type:"password",value:n,onChange:s=>x(s.target.value),required:!0,className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),o&&e.jsx("p",{className:"text-sm text-destructive",children:o}),e.jsx("button",{type:"submit",disabled:i,className:"w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-60",children:i?"Signing in...":"Sign in"})]})})}export{b as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.