import{W as u,r as x,j as s,Y as f}from"./app-BAHAOwU3.js";import{G as j}from"./guest-layout-g1xwyawt.js";import{L as t}from"./label-DP7sGf18.js";import{I as m}from"./input-CeK7CEQL.js";import{I as i}from"./input-error-Be2KxtIS.js";import{B as h}from"./button-T-Jxhehc.js";import{C,a as g,e as v,b as N,c as b,d as _}from"./card-pClq6asL.js";function D({token:n,email:d}){const{data:e,setData:r,post:l,processing:p,errors:o,reset:c}=u({token:n,email:d,password:"",password_confirmation:""});x.useEffect(()=>()=>{c("password","password_confirmation")},[]);const w=a=>{a.preventDefault(),l(route("password.store"))};return s.jsxs(j,{children:[s.jsx(f,{title:"Reset Password"}),s.jsx("form",{onSubmit:w,children:s.jsxs(C,{children:[s.jsxs(g,{children:[s.jsx(v,{children:"Reset Password"}),s.jsx(N,{children:"Enter your new password"})]}),s.jsxs(b,{children:[s.jsxs("div",{children:[s.jsx(t,{htmlFor:"email",children:"Email"}),s.jsx(m,{id:"email",type:"email",name:"email",value:e.email,className:"mt-1 block w-full",autoComplete:"username",onChange:a=>r("email",a.target.value)}),s.jsx(i,{message:o.email,className:"mt-2"})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx(t,{htmlFor:"password",children:"Password"}),s.jsx(m,{id:"password",type:"password",name:"password",value:e.password,className:"mt-1 block w-full",autoComplete:"new-password",onChange:a=>r("password",a.target.value)}),s.jsx(i,{message:o.password,className:"mt-2"})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx(t,{htmlFor:"password_confirmation",children:"Confirm Password"}),s.jsx(m,{type:"password",name:"password_confirmation",value:e.password_confirmation,className:"mt-1 block w-full",autoComplete:"new-password",onChange:a=>r("password_confirmation",a.target.value)}),s.jsx(i,{message:o.password_confirmation,className:"mt-2"})]})]}),s.jsx(_,{className:"justify-end",children:s.jsx(h,{disabled:p,children:"Reset Password"})})]})})]})}export{D as default};
