import{Kt as e,Mt as t,Q as n,R as r,Tn as i,X as a,Xn as o,Y as s,Z as c,at as l,it as u,n as d,or as f,r as p,st as m}from"./dist-CoD0k1Bd.js";import{t as h}from"./Label-DKn3cyeE.js";import{t as g}from"./PasswordInput-CusCXasZ.js";import{t as _}from"./Input-C3DwKNOf.js";import{t as v}from"./button-mN_poAXs.js";import{t as y}from"./InputError-BY5lDrFd.js";import{t as b}from"./Spinner-DSMwRdd9.js";import{r as x}from"./password-CB_NxgQN.js";var S={class:`grid gap-6`},C={class:`grid gap-2`},w={class:`grid gap-2`},T={class:`grid gap-2`},E=m({layout:{title:`Reset password`,description:`Please enter your new password below`},__name:`ResetPassword`,props:{token:{},email:{},passwordRules:{}},setup(m){let E=o(m.email);return(o,D)=>(e(),n(r,null,[l(f(p),{title:`Reset password`}),l(f(d),t(f(x).form(),{transform:e=>({...e,token:m.token,email:m.email}),"reset-on-success":[`password`,`password_confirmation`]}),{default:i(({errors:t,processing:n})=>[s(`div`,S,[s(`div`,C,[l(f(h),{for:`email`},{default:i(()=>[...D[1]||=[u(`Email`,-1)]]),_:1}),l(f(_),{id:`email`,type:`email`,name:`email`,autocomplete:`email`,modelValue:E.value,"onUpdate:modelValue":D[0]||=e=>E.value=e,class:`mt-1 block w-full`,readonly:``},null,8,[`modelValue`]),l(y,{message:t.email,class:`mt-2`},null,8,[`message`])]),s(`div`,w,[l(f(h),{for:`password`},{default:i(()=>[...D[2]||=[u(`Password`,-1)]]),_:1}),l(g,{id:`password`,name:`password`,autocomplete:`new-password`,class:`mt-1 block w-full`,autofocus:``,placeholder:`Password`,passwordrules:m.passwordRules},null,8,[`passwordrules`]),l(y,{message:t.password},null,8,[`message`])]),s(`div`,T,[l(f(h),{for:`password_confirmation`},{default:i(()=>[...D[3]||=[u(` Confirm password `,-1)]]),_:1}),l(g,{id:`password_confirmation`,name:`password_confirmation`,autocomplete:`new-password`,class:`mt-1 block w-full`,placeholder:`Confirm password`,passwordrules:m.passwordRules},null,8,[`passwordrules`]),l(y,{message:t.password_confirmation},null,8,[`message`])]),l(f(v),{type:`submit`,class:`mt-4 w-full`,disabled:n,"data-test":`reset-password-button`},{default:i(()=>[n?(e(),a(f(b),{key:0})):c(``,!0),D[4]||=u(` Reset password `,-1)]),_:2},1032,[`disabled`])])]),_:1},16,[`transform`])],64))}});export{E as default};