import{n as e,t}from"./jsx-runtime-BrKkGzFB.js";import{t as n}from"./password-input-DWL5jxHj.js";import{B as r,Et as i,O as a,Tt as o,at as s}from"./app-KzKSswgw.js";import{t as c}from"./input-error-B1iqlu2_.js";import{t as l}from"./label-1JB2VirV.js";import{r as u}from"./password-BTPIYPD6.js";var d=e(),f=t();function p(e){let t=(0,d.c)(11),{token:p,email:m}=e,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,f.jsx)(i,{title:`Reset password`}),t[0]=h):h=t[0];let g;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(g=u.form(),t[1]=g):g=t[1];let _;t[2]!==m||t[3]!==p?(_=e=>({...e,token:p,email:m}),t[2]=m,t[3]=p,t[4]=_):_=t[4];let v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=[`password`,`password_confirmation`],t[5]=v):v=t[5];let y;t[6]===m?y=t[7]:(y=e=>{let{processing:t,errors:i}=e;return(0,f.jsxs)(`div`,{className:`grid gap-6`,children:[(0,f.jsxs)(`div`,{className:`grid gap-2`,children:[(0,f.jsx)(l,{htmlFor:`email`,children:`Email`}),(0,f.jsx)(a,{id:`email`,type:`email`,name:`email`,autoComplete:`email`,value:m,className:`mt-1 block w-full`,readOnly:!0}),(0,f.jsx)(c,{message:i.email,className:`mt-2`})]}),(0,f.jsxs)(`div`,{className:`grid gap-2`,children:[(0,f.jsx)(l,{htmlFor:`password`,children:`Password`}),(0,f.jsx)(n,{id:`password`,name:`password`,autoComplete:`new-password`,className:`mt-1 block w-full`,autoFocus:!0,placeholder:`Password`}),(0,f.jsx)(c,{message:i.password})]}),(0,f.jsxs)(`div`,{className:`grid gap-2`,children:[(0,f.jsx)(l,{htmlFor:`password_confirmation`,children:`Confirm password`}),(0,f.jsx)(n,{id:`password_confirmation`,name:`password_confirmation`,autoComplete:`new-password`,className:`mt-1 block w-full`,placeholder:`Confirm password`}),(0,f.jsx)(c,{message:i.password_confirmation,className:`mt-2`})]}),(0,f.jsxs)(r,{type:`submit`,className:`mt-4 w-full`,disabled:t,"data-test":`reset-password-button`,children:[t&&(0,f.jsx)(s,{}),`Reset password`]})]})},t[6]=m,t[7]=y);let b;return t[8]!==_||t[9]!==y?(b=(0,f.jsxs)(f.Fragment,{children:[h,(0,f.jsx)(o,{...g,transform:_,resetOnSuccess:v,children:y})]}),t[8]=_,t[9]=y,t[10]=b):b=t[10],b}p.layout={title:`Reset password`,description:`Please enter your new password below`};export{p as default};