import{W as p,a as j,j as s,b as o}from"./BulkImageUpload-DGPbX05r.js";import{U as u}from"./User-DMCQU0ZG.js";import{I as c}from"./Input-CR3dcIBA.js";import{C as N}from"./Checkbox-SOmkVdzg.js";import"./bootstrap.esm-e_F80uXB.js";const E=({status:w,canResetPassword:d})=>{const{data:r,setData:i,post:t,processing:m,errors:a,reset:n,clearErrors:h}=p({email:"",password:"",remember:""});j.useEffect(()=>()=>{n("password")},[]);const l=e=>{i(e.target.name,e.target.type==="checkbox"?e.target.checked:e.target.value),h(e.target.name)},x=e=>{e.preventDefault(),t(route("login"),{preserveState:!0,onSuccess:()=>{window.location.href=route("user-dashboard")}})};return s.jsx(u,{children:s.jsx("div",{className:"authbg",children:s.jsxs("div",{className:"container auth-container",children:[s.jsx("form",{onSubmit:x,children:s.jsx("div",{className:"row",children:s.jsxs("div",{className:"col-lg-6 col-md-10 mx-auto shadow authcard",children:[s.jsx("div",{className:"titlecover",children:s.jsx("h2",{children:"User Login"})}),s.jsxs("div",{className:"row form-row",children:[s.jsxs("div",{className:"col-md-4",children:[s.jsx("label",{htmlFor:"",children:"Email Address"}),s.jsx("span",{className:"spcol",children:":"})]}),s.jsxs("div",{className:"col-md-8",children:[s.jsx(c,{type:"text",name:"email",value:r.email,className:a.email&&"inerror",autoComplete:"username",placeholder:"Enter Email Address",isFocused:!0,handleChange:l}),a.email&&s.jsx("div",{className:"smart-valid",children:a.email})]})]}),s.jsxs("div",{className:"row form-row",children:[s.jsxs("div",{className:"col-md-4",children:[s.jsx("label",{htmlFor:"",children:"Enter Password"}),s.jsx("span",{className:"spcol",children:":"})]}),s.jsxs("div",{className:"col-md-8",children:[s.jsx(c,{type:"password",name:"password",value:r.password,className:a.password&&"inerror",autoComplete:"current-password",placeholder:"Enter Password",handleChange:l}),a.password&&s.jsx("div",{className:"smart-valid",children:a.password})]})]}),s.jsxs("div",{className:"row form-row",children:[s.jsx("div",{className:"col-md-4"}),s.jsx("div",{className:"col-md-8 mb-4",children:s.jsx("p",{className:" obju",children:s.jsxs("span",{className:"align-left",children:[s.jsx(N,{name:"remember",value:r.remember,handleChange:l})," Keep me Login"]})})})]}),s.jsxs("div",{className:"row form-row",children:[s.jsx("div",{className:"col-md-4"}),s.jsxs("div",{className:"col-md-8 fpswd",children:[s.jsx("button",{disabled:m,className:"btn px-4 btn-primary",children:" Login "}),s.jsx("span",{className:"align-right",children:d&&s.jsx(o,{href:route("password.request"),className:"underline text-sm text-gray-600 hover:text-gray-900",children:"Forgot your password?"})})]})]}),s.jsx("div",{className:"row mt-4 text-center form-row",children:s.jsxs("p",{children:["Don’t have an account ",s.jsxs(o,{className:"text-primary",href:route("registration"),children:[s.jsx("b",{children:"Click to Sign Up"})," "]})]})})]})})})," `"]})})})};export{E as default};
