import{u as h,r as v,j as a,a as s,H as g}from"./app-f632e8c1.js";import{G as N}from"./GuestLayout-fec241af.js";import{I as m}from"./InputError-426ec0a2.js";import{I as n}from"./InputLabel-ce28f461.js";import{P as C}from"./PrimaryButton-a1e4e467.js";import{T as l}from"./TextInput-63d181d2.js";function k({token:i,email:d,logo:p}){const{data:r,setData:u,post:c,processing:w,errors:o,reset:f}=h({token:i,email:d,password:"",password_confirmation:""});v.exports.useEffect(()=>()=>{f("password","password_confirmation")},[]);const t=e=>{u(e.target.name,e.target.value)};return a(N,{logo:p,children:[s(g,{title:"Reset Password"}),a("form",{onSubmit:e=>{e.preventDefault(),c(route("password.store"))},children:[a("div",{children:[s(n,{forInput:"email",value:"Email"}),s(l,{id:"email",type:"email",name:"email",value:r.email,className:"mt-1 block w-full",autoComplete:"username",handleChange:t}),s(m,{message:o.email,className:"mt-2"})]}),a("div",{className:"mt-4",children:[s(n,{forInput:"password",value:"Password"}),s(l,{id:"password",type:"password",name:"password",value:r.password,className:"mt-1 block w-full",autoComplete:"new-password",isFocused:!0,handleChange:t}),s(m,{message:o.password,className:"mt-2"})]}),a("div",{className:"mt-4",children:[s(n,{forInput:"password_confirmation",value:"Confirm Password"}),s(l,{type:"password",name:"password_confirmation",value:r.password_confirmation,className:"mt-1 block w-full",autoComplete:"new-password",handleChange:t}),s(m,{message:o.password_confirmation,className:"mt-2"})]}),s("div",{className:"flex items-center justify-end mt-4",children:s(C,{className:"ml-4",processing:w,children:"Reset Password"})})]})]})}export{k as default};
