import{j as r,H as u,F as c}from"./app-Ajql0Lt4.js";import{q as l,B as p,l as h}from"./createLucideIcon-B_iAwCmA.js";import{I as o}from"./input-error-Drp3HhtP.js";import{T as x}from"./text-link-D6DcgXYJ.js";import{I as i}from"./input-B0_NTiRR.js";import{L as m}from"./label-D8DO87nw.js";import{A as g}from"./auth-layout-BA0f4QcD.js";import{L as f}from"./loader-circle-C6-iW413.js";import"./app-B4XVefei.js";import"./index-em-EQZzp.js";import"./app-logo-icon-B9D8MR-Y.js";const t=e=>({url:t.url(e),method:"get"});t.definition={methods:["get","head"],url:"/register"};t.url=e=>t.definition.url+l(e);t.get=e=>({url:t.url(e),method:"get"});t.head=e=>({url:t.url(e),method:"head"});const d=e=>({action:t.url(e),method:"get"});d.get=e=>({action:t.url(e),method:"get"});d.head=e=>({action:t.url({[e?.mergeQuery?"mergeQuery":"query"]:{_method:"HEAD",...e?.query??e?.mergeQuery??{}}}),method:"get"});t.form=d;const s=e=>({url:s.url(e),method:"post"});s.definition={methods:["post"],url:"/register"};s.url=e=>s.definition.url+l(e);s.post=e=>({url:s.url(e),method:"post"});const n=e=>({action:s.url(e),method:"post"});n.post=e=>({action:s.url(e),method:"post"});s.form=n;const j={store:s};function E(){return r.jsxs(g,{title:"Create an account",description:"Enter your details below to create your account",children:[r.jsx(u,{title:"Register"}),r.jsx(c,{...j.store.form(),resetOnSuccess:["password","password_confirmation"],disableWhileProcessing:!0,className:"flex flex-col gap-6",children:({processing:e,errors:a})=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"grid gap-6",children:[r.jsxs("div",{className:"grid gap-2",children:[r.jsx(m,{htmlFor:"name",children:"Name"}),r.jsx(i,{id:"name",type:"text",required:!0,autoFocus:!0,tabIndex:1,autoComplete:"name",name:"name",placeholder:"Full name"}),r.jsx(o,{message:a.name,className:"mt-2"})]}),r.jsxs("div",{className:"grid gap-2",children:[r.jsx(m,{htmlFor:"email",children:"Email address"}),r.jsx(i,{id:"email",type:"email",required:!0,tabIndex:2,autoComplete:"email",name:"email",placeholder:"email@example.com"}),r.jsx(o,{message:a.email})]}),r.jsxs("div",{className:"grid gap-2",children:[r.jsx(m,{htmlFor:"password",children:"Password"}),r.jsx(i,{id:"password",type:"password",required:!0,tabIndex:3,autoComplete:"new-password",name:"password",placeholder:"Password"}),r.jsx(o,{message:a.password})]}),r.jsxs("div",{className:"grid gap-2",children:[r.jsx(m,{htmlFor:"password_confirmation",children:"Confirm password"}),r.jsx(i,{id:"password_confirmation",type:"password",required:!0,tabIndex:4,autoComplete:"new-password",name:"password_confirmation",placeholder:"Confirm password"}),r.jsx(o,{message:a.password_confirmation})]}),r.jsxs(p,{type:"submit",className:"mt-2 w-full",tabIndex:5,"data-test":"register-user-button",children:[e&&r.jsx(f,{className:"h-4 w-4 animate-spin"}),"Create account"]})]}),r.jsxs("div",{className:"text-center text-sm text-muted-foreground",children:["Already have an account?"," ",r.jsx(x,{href:h(),tabIndex:6,children:"Log in"})]})]})})]})}export{E as default};