import{a as e,i as t,n,r}from"./createLucideIcon-P71pXhjD.js";import{t as i}from"./button-6mRKmJ-z.js";import{n as a}from"./wayfinder-Dp7PqxvV.js";import{f as o,s}from"./app-AaPQHUQ2.js";import{t as c}from"./input-error-BiLRn-Z7.js";import{t as l}from"./spinner-CW5Oo-WE.js";import{t as u}from"./password-input-DWwkvzqO.js";import{t as d}from"./label-DaZue_U7.js";import{t as f}from"./text-link-DdbwUe4P.js";var p=r(),m=e=>({url:m.url(e),method:`post`});m.definition={methods:[`post`],url:`/register`},m.url=e=>m.definition.url+a(e),m.post=e=>({url:m.url(e),method:`post`});var h=e=>({action:m.url(e),method:`post`});h.post=e=>({action:m.url(e),method:`post`}),m.form=h,Object.assign(m,m);var g=n();function _(n){let r=(0,p.c)(5),{passwordRules:a}=n,h;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,g.jsx)(e,{title:`Crear cuenta`}),r[0]=h):h=r[0];let _,v;r[1]===Symbol.for(`react.memo_cache_sentinel`)?(_=m.form(),v=[`password`,`password_confirmation`],r[1]=_,r[2]=v):(_=r[1],v=r[2]);let y;return r[3]===a?y=r[4]:(y=(0,g.jsxs)(g.Fragment,{children:[h,(0,g.jsx)(t,{..._,resetOnSuccess:v,disableWhileProcessing:!0,className:`flex flex-col gap-6`,children:e=>{let{processing:t,errors:n}=e;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`grid gap-6`,children:[(0,g.jsxs)(`div`,{className:`grid gap-2`,children:[(0,g.jsx)(d,{htmlFor:`name`,children:`Nombre completo`}),(0,g.jsx)(o,{id:`name`,type:`text`,required:!0,autoFocus:!0,tabIndex:1,autoComplete:`name`,name:`name`,placeholder:`Nombre y apellidos`}),(0,g.jsx)(c,{message:n.name,className:`mt-2`})]}),(0,g.jsxs)(`div`,{className:`grid gap-2`,children:[(0,g.jsx)(d,{htmlFor:`email`,children:`Correo electrónico`}),(0,g.jsx)(o,{id:`email`,type:`email`,required:!0,tabIndex:2,autoComplete:`email`,name:`email`,placeholder:`nombre@correo.com`}),(0,g.jsx)(c,{message:n.email})]}),(0,g.jsxs)(`div`,{className:`grid gap-2`,children:[(0,g.jsx)(d,{htmlFor:`password`,children:`Contraseña`}),(0,g.jsx)(u,{id:`password`,required:!0,tabIndex:3,autoComplete:`new-password`,name:`password`,placeholder:`Contraseña`,passwordrules:a}),(0,g.jsx)(c,{message:n.password})]}),(0,g.jsxs)(`div`,{className:`grid gap-2`,children:[(0,g.jsx)(d,{htmlFor:`password_confirmation`,children:`Confirmar contraseña`}),(0,g.jsx)(u,{id:`password_confirmation`,required:!0,tabIndex:4,autoComplete:`new-password`,name:`password_confirmation`,placeholder:`Repite tu contraseña`,passwordrules:a}),(0,g.jsx)(c,{message:n.password_confirmation})]}),(0,g.jsxs)(i,{type:`submit`,className:`mt-2 w-full`,tabIndex:5,"data-test":`register-user-button`,children:[t&&(0,g.jsx)(l,{}),`Crear mi cuenta`]})]}),(0,g.jsxs)(`div`,{className:`text-center text-sm text-muted-foreground`,children:[`¿Ya tienes una cuenta?`,` `,(0,g.jsx)(f,{href:s(),tabIndex:6,children:`Iniciar sesión`})]})]})}})]}),r[3]=a,r[4]=y),y}_.layout={title:`Crea tu espacio Lotea`,description:`Guarda terrenos, consulta cotizaciones y organiza tus visitas.`};export{_ as default};