import{c as w,j as t,F as I,H as N}from"./app-BeNY_zSm.js";import{I as h}from"./input-error-BuSkOAIK.js";import{T as g}from"./text-link-CfYbjfJk.js";import{B as _}from"./button-Dge8PO59.js";import{C as v}from"./checkbox-CP6n_Jsi.js";import{I as b}from"./input-C0y5Yptz.js";import{L as p}from"./label-GwfI79i1.js";import{S as E}from"./spinner-BMqpgMxI.js";import{A as F}from"./auth-layout-NcpT7Xca.js";import{q as L,r as S}from"./index-6bh5m_Va.js";import{r as R}from"./index-5yw_4hTS.js";/* empty css            */import"./check-ApYQKYPd.js";import"./createLucideIcon-VdTyGa1S.js";import"./loader-circle-B3vU0DzH.js";import"./app-logo-icon-vDeU-Cqe.js";import"./index-DSOmN0e0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"d90f819d28d132ee9ad7641cbed0d6343dd98ccf"}}catch{}})();try{(function(){var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="00eef821-ff1a-42c1-adca-d9ad190c5b4f",s._sentryDebugIdIdentifier="sentry-dbid-00eef821-ff1a-42c1-adca-d9ad190c5b4f")})()}catch{}const r=s=>({url:r.url(s),method:"post"});r.definition={methods:["post"],url:"/login"};r.url=s=>r.definition.url+L(s);r.post=s=>({url:r.url(s),method:"post"});const j=s=>({action:r.url(s),method:"post"});j.post=s=>({action:r.url(s),method:"post"});r.form=j;Object.assign(r,r);function Q(s){const e=w.c(11),{status:i,canResetPassword:c,canRegister:f}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(N,{title:"Log in"}),e[0]=n):n=e[0];let d,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=r.form(),l=["password"],e[1]=d,e[2]=l):(d=e[1],l=e[2]);let o;e[3]!==f||e[4]!==c?(o=t.jsx(I,{...d,resetOnSuccess:l,className:"flex flex-col gap-6",children:y=>{const{processing:u,errors:x}=y;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-6",children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx(p,{htmlFor:"email",children:"Email address"}),t.jsx(b,{id:"email",type:"email",name:"email",required:!0,autoFocus:!0,tabIndex:1,autoComplete:"email",placeholder:"email@example.com"}),t.jsx(h,{message:x.email})]}),t.jsxs("div",{className:"grid gap-2",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx(p,{htmlFor:"password",children:"Password"}),c&&t.jsx(g,{href:R(),className:"ml-auto text-sm",tabIndex:5,children:"Forgot password?"})]}),t.jsx(b,{id:"password",type:"password",name:"password",required:!0,tabIndex:2,autoComplete:"current-password",placeholder:"Password"}),t.jsx(h,{message:x.password})]}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(v,{id:"remember",name:"remember",tabIndex:3}),t.jsx(p,{htmlFor:"remember",children:"Remember me"})]}),t.jsxs(_,{type:"submit",className:"mt-4 w-full",tabIndex:4,disabled:u,"data-test":"login-button",children:[u&&t.jsx(E,{}),"Log in"]})]}),f&&t.jsxs("div",{className:"text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",t.jsx(g,{href:S(),tabIndex:5,children:"Sign up"})]})]})}}),e[3]=f,e[4]=c,e[5]=o):o=e[5];let a;e[6]!==i?(a=i&&t.jsx("div",{className:"mb-4 text-center text-sm font-medium text-green-600",children:i}),e[6]=i,e[7]=a):a=e[7];let m;return e[8]!==o||e[9]!==a?(m=t.jsxs(F,{title:"Log in to your account",description:"Enter your email and password below to log in",children:[n,o,a]}),e[8]=o,e[9]=a,e[10]=m):m=e[10],m}export{Q as default};
//# sourceMappingURL=login-DcqkR_dQ.js.map
