import{m as u,j as s,L as f}from"./app-D_lWdAF1.js";import{I as t}from"./input-error-Dz46bbCi.js";import{B as h}from"./app-logo-icon-B18IWF-o.js";import{L as i,I as m}from"./label-4h6KnNp-.js";import{A as x}from"./auth-layout-CPcoyQnT.js";import{L as j}from"./loader-circle-CqvjZacN.js";import"./app-gFGt7Tbg.js";import"./index-DKsctv8k.js";function F({token:d,email:n}){const{data:e,setData:o,post:p,processing:l,errors:r,reset:c}=u({token:d,email:n,password:"",password_confirmation:""}),w=a=>{a.preventDefault(),p(route("password.store"),{onFinish:()=>c("password","password_confirmation")})};return s.jsxs(x,{title:"Reset password",description:"Please enter your new password below",children:[s.jsx(f,{title:"Reset password"}),s.jsx("form",{onSubmit:w,children:s.jsxs("div",{className:"grid gap-6",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(i,{htmlFor:"email",children:"Email"}),s.jsx(m,{id:"email",type:"email",name:"email",autoComplete:"email",value:e.email,className:"mt-1 block w-full",readOnly:!0,onChange:a=>o("email",a.target.value)}),s.jsx(t,{message:r.email,className:"mt-2"})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(i,{htmlFor:"password",children:"Password"}),s.jsx(m,{id:"password",type:"password",name:"password",autoComplete:"new-password",value:e.password,className:"mt-1 block w-full",autoFocus:!0,onChange:a=>o("password",a.target.value),placeholder:"Password"}),s.jsx(t,{message:r.password})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(i,{htmlFor:"password_confirmation",children:"Confirm password"}),s.jsx(m,{id:"password_confirmation",type:"password",name:"password_confirmation",autoComplete:"new-password",value:e.password_confirmation,className:"mt-1 block w-full",onChange:a=>o("password_confirmation",a.target.value),placeholder:"Confirm password"}),s.jsx(t,{message:r.password_confirmation,className:"mt-2"})]}),s.jsxs(h,{type:"submit",className:"mt-4 w-full",disabled:l,children:[l&&s.jsx(j,{className:"h-4 w-4 animate-spin"}),"Reset password"]})]})})]})}export{F as default};
