import{W as u,r as p,j as e,Y as h,a as o}from"./app-BAHAOwU3.js";import{G as j}from"./guest-layout-g1xwyawt.js";import{C as g,a as f,e as w,b as v,c as N}from"./card-pClq6asL.js";import{L as l}from"./label-DP7sGf18.js";import{I as n}from"./input-CeK7CEQL.js";import{B as b}from"./button-T-Jxhehc.js";import{I as m}from"./input-error-Be2KxtIS.js";function G({status:r,canResetPassword:C}){const{data:a,setData:t,post:d,processing:y,errors:i,reset:c}=u({email:"",password:"",remember:!1});p.useEffect(()=>()=>{c("password")},[]);const x=s=>{s.preventDefault(),d(route("login"))};return e.jsxs(j,{children:[e.jsx(h,{title:"Log in"}),e.jsx("form",{onSubmit:x,children:e.jsxs(g,{className:"mx-auto max-w-sm",children:[e.jsxs(f,{children:[e.jsx(w,{className:"text-2xl",children:"Login"}),e.jsx(v,{children:"Enter your email below to login to your account"})]}),e.jsxs(N,{children:[r&&e.jsx("div",{className:"mb-4 font-medium text-sm text-green-600",children:r}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(l,{htmlFor:"email",children:"Email"}),e.jsx(n,{id:"email",type:"email",placeholder:"m@example.com",value:a.email,onChange:s=>t("email",s.target.value),required:!0}),e.jsx(m,{message:i.email})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(l,{htmlFor:"password",children:"Password"}),e.jsx(o,{href:route("password.request"),className:"ml-auto inline-block text-sm underline",children:"Forgot your password?"})]}),e.jsx(n,{id:"password",type:"password",value:a.password,onChange:s=>t("password",s.target.value),required:!0}),e.jsx(m,{message:i.password})]}),e.jsx(b,{type:"submit",className:"w-full",children:"Login"})]}),e.jsxs("div",{className:"mt-4 text-center text-sm",children:["Don't have an account?"," ",e.jsx(o,{href:"/register",className:"underline",children:"Sign up"})]})]})]})})]})}export{G as default};
