import{S as x,r as f,j as s,e as j}from"./app-DB4YCWeF.js";import{G as h}from"./GuestLayout-LP695uwk.js";import{T as r,I as m}from"./TextInput-NMQJsSGr.js";import{I as n}from"./InputLabel-CWWWKDVv.js";function C({token:l,email:i}){const{data:e,setData:d,post:p,processing:c,errors:o,reset:u}=x({token:l,email:i,password:"",password_confirmation:""});f.useEffect(()=>()=>{u("password","password_confirmation")},[]);const t=a=>{d(a.target.name,a.target.value)},w=a=>{a.preventDefault(),p(route("password.store"))};return s.jsxs(h,{children:[s.jsx(j,{title:"Reset Password"}),s.jsxs("form",{onSubmit:w,children:[s.jsxs("div",{children:[s.jsx(n,{htmlFor:"email",value:"Email"}),s.jsx(r,{id:"email",type:"email",name:"email",value:e.email,className:"mt-1 block w-full",autoComplete:"username",onChange:t}),s.jsx(m,{message:o.email,className:"mt-2"})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx(n,{htmlFor:"password",value:"Password"}),s.jsx(r,{id:"password",type:"password",name:"password",value:e.password,className:"mt-1 block w-full",autoComplete:"new-password",isFocused:!0,onChange:t}),s.jsx(m,{message:o.password,className:"mt-2"})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx(n,{htmlFor:"password_confirmation",value:"Confirm Password"}),s.jsx(r,{type:"password",name:"password_confirmation",value:e.password_confirmation,className:"mt-1 block w-full",autoComplete:"new-password",onChange:t}),s.jsx(m,{message:o.password_confirmation,className:"mt-2"})]}),s.jsx("div",{className:"flex items-center justify-end mt-4",children:s.jsx("button",{className:"btn btn-sm btn-primary",disabled:c,children:"Reset Password"})})]})]})}export{C as default};
