import{A as e,B as t,D as n,E as r,K as i,M as a,T as o,b as s,j as c,n as l,ot as u,r as d,w as f,wt as p}from"./dist-B4ulKgpj.js";import{t as m}from"./Label-CFnMyEie.js";import{t as h}from"./PasswordInput-kioHp5xS.js";import{t as g}from"./Spinner-CPbipFa_.js";import{t as _}from"./Input-DUc0hUPv.js";import{n as v}from"./wayfinder-CgqleRqW.js";import{l as y,o as b}from"./app-DUC9tg6Z.js";import{t as x}from"./InputError-whMZ-BCS.js";import{t as S}from"./TextLink-Bp1JICDi.js";var C=e=>({url:C.url(e),method:`post`});C.definition={methods:[`post`],url:`/register`},C.url=e=>C.definition.url+v(e),C.post=e=>({url:C.url(e),method:`post`});var w=e=>({action:C.url(e),method:`post`});w.post=e=>({action:C.url(e),method:`post`}),C.form=w,Object.assign(C,C);var T={class:`grid gap-6`},E={class:`grid gap-2`},D={class:`grid gap-2`},O={class:`grid gap-2`},k={class:`grid gap-2`},A={class:`text-center text-sm text-muted-foreground`},j=a({layout:{title:`Create an account`,description:`Enter your details below to create your account`},__name:`Register`,setup(a){return(a,v)=>(i(),n(s,null,[c(p(d),{title:`Register`}),c(p(l),t(p(C).form(),{"reset-on-success":[`password`,`password_confirmation`],class:`flex flex-col gap-6`}),{default:u(({errors:t,processing:n})=>[f(`div`,T,[f(`div`,E,[c(p(m),{for:`name`},{default:u(()=>[...v[0]||=[e(`Name`,-1)]]),_:1}),c(p(_),{id:`name`,type:`text`,required:``,autofocus:``,tabindex:1,autocomplete:`name`,name:`name`,placeholder:`Full name`}),c(x,{message:t.name},null,8,[`message`])]),f(`div`,D,[c(p(m),{for:`email`},{default:u(()=>[...v[1]||=[e(`Email address`,-1)]]),_:1}),c(p(_),{id:`email`,type:`email`,required:``,tabindex:2,autocomplete:`email`,name:`email`,placeholder:`email@example.com`}),c(x,{message:t.email},null,8,[`message`])]),f(`div`,O,[c(p(m),{for:`password`},{default:u(()=>[...v[2]||=[e(`Password`,-1)]]),_:1}),c(h,{id:`password`,required:``,tabindex:3,autocomplete:`new-password`,name:`password`,placeholder:`Password`}),c(x,{message:t.password},null,8,[`message`])]),f(`div`,k,[c(p(m),{for:`password_confirmation`},{default:u(()=>[...v[3]||=[e(`Confirm password`,-1)]]),_:1}),c(h,{id:`password_confirmation`,required:``,tabindex:4,autocomplete:`new-password`,name:`password_confirmation`,placeholder:`Confirm password`}),c(x,{message:t.password_confirmation},null,8,[`message`])]),c(p(y),{type:`submit`,class:`mt-2 w-full`,tabindex:`5`,disabled:n,"data-test":`register-user-button`},{default:u(()=>[n?(i(),o(p(g),{key:0})):r(``,!0),v[4]||=e(` Create account `,-1)]),_:2},1032,[`disabled`])]),f(`div`,A,[v[6]||=e(` Already have an account? `,-1),c(S,{href:p(b)(),class:`underline underline-offset-4`,tabindex:6},{default:u(()=>[...v[5]||=[e(`Log in`,-1)]]),_:1},8,[`href`])])]),_:1},16)],64))}});export{j as default};