import{_ as e,a as t,i as n,o as r,s as i}from"./i18n-DfIivedY.js";import{t as a}from"./password-input-Ch4XbVtj.js";import{Dt as o,Et as s}from"./app-BUWZBqJJ.js";import{t as c}from"./label-DKp4ZT7r.js";import{t as l}from"./input-error-DINAq-Y-.js";import{c as u,i as d,r as f}from"./styles-CjVbMPwe.js";import{t as p}from"./spinner-zY0Cj43D.js";import{r as m}from"./password-B146a-dj.js";var h=e(),g=t();function _(e){let t=(0,h.c)(18),{token:_,email:v}=e,{t:y}=n(),b;t[0]===y?b=t[1]:(b=y(`Reset password`),t[0]=y,t[1]=b);let x;t[2]===b?x=t[3]:(x=(0,g.jsx)(i,{title:b}),t[2]=b,t[3]=x);let S;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(S=m.form(),t[4]=S):S=t[4];let C;t[5]!==v||t[6]!==_?(C=e=>({...e,token:_,email:v}),t[5]=v,t[6]=_,t[7]=C):C=t[7];let w;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(w=[`password`,`password_confirmation`],t[8]=w):w=t[8];let T;t[9]!==v||t[10]!==y?(T=e=>{let{processing:t,errors:n}=e;return(0,g.jsxs)(`div`,{className:`grid gap-4`,children:[(0,g.jsxs)(`div`,{className:`grid gap-2`,children:[(0,g.jsx)(c,{htmlFor:`email`,className:d,children:y(`Email`)}),(0,g.jsx)(s,{id:`email`,type:`email`,name:`email`,autoComplete:`email`,value:v,readOnly:!0,className:f}),(0,g.jsx)(l,{message:n.email})]}),(0,g.jsxs)(`div`,{className:`grid gap-2`,children:[(0,g.jsx)(c,{htmlFor:`password`,className:d,children:y(`Password`)}),(0,g.jsx)(a,{id:`password`,name:`password`,autoComplete:`new-password`,autoFocus:!0,placeholder:y(`Password`),className:f}),(0,g.jsx)(l,{message:n.password})]}),(0,g.jsxs)(`div`,{className:`grid gap-2`,children:[(0,g.jsx)(c,{htmlFor:`password_confirmation`,className:d,children:y(`Confirm password`)}),(0,g.jsx)(a,{id:`password_confirmation`,name:`password_confirmation`,autoComplete:`new-password`,placeholder:y(`Confirm password`),className:f}),(0,g.jsx)(l,{message:n.password_confirmation})]}),(0,g.jsxs)(o,{type:`submit`,className:`${u} mt-1 w-full`,disabled:t,"data-test":`reset-password-button`,children:[t&&(0,g.jsx)(p,{}),y(`Reset password`)]})]})},t[9]=v,t[10]=y,t[11]=T):T=t[11];let E;t[12]!==C||t[13]!==T?(E=(0,g.jsx)(r,{...S,transform:C,resetOnSuccess:w,className:`grid gap-5`,children:T}),t[12]=C,t[13]=T,t[14]=E):E=t[14];let D;return t[15]!==x||t[16]!==E?(D=(0,g.jsxs)(g.Fragment,{children:[x,E]}),t[15]=x,t[16]=E,t[17]=D):D=t[17],D}_.layout={title:`Reset password`,description:`Please enter your new password below`};export{_ as default};