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