import{a as e,i as t,n,r}from"./createLucideIcon-P71pXhjD.js";import{t as i}from"./button-6mRKmJ-z.js";import{f as a}from"./app-AaPQHUQ2.js";import{t as o}from"./input-error-BiLRn-Z7.js";import{t as s}from"./spinner-CW5Oo-WE.js";import{t as c}from"./password-input-DWwkvzqO.js";import{t as l}from"./label-DaZue_U7.js";import{r as u}from"./password-CB_NxgQN.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)(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)(o,{message:n.email,className:`mt-2`})]}),(0,f.jsxs)(`div`,{className:`grid gap-2`,children:[(0,f.jsx)(l,{htmlFor:`password`,children:`Password`}),(0,f.jsx)(c,{id:`password`,name:`password`,autoComplete:`new-password`,className:`mt-1 block w-full`,autoFocus:!0,placeholder:`Password`,passwordrules:h}),(0,f.jsx)(o,{message:n.password})]}),(0,f.jsxs)(`div`,{className:`grid gap-2`,children:[(0,f.jsx)(l,{htmlFor:`password_confirmation`,children:`Confirm password`}),(0,f.jsx)(c,{id:`password_confirmation`,name:`password_confirmation`,autoComplete:`new-password`,className:`mt-1 block w-full`,placeholder:`Confirm password`,passwordrules:h}),(0,f.jsx)(o,{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)(s,{}),`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};