import{q as w,l as x}from"./index-Z7dItZLR.js";import{_ as l}from"./InputError.vue_vue_type_script_setup_true_lang-DniwR9eG.js";import{_ as y}from"./TextLink.vue_vue_type_script_setup_true_lang-B-Vh5vLl.js";import{_ as b}from"./AppLogoIcon.vue_vue_type_script_setup_true_lang-M23wUS8o.js";import{_ as u}from"./Input.vue_vue_type_script_setup_true_lang-C985hTdX.js";import{_ as p}from"./Label.vue_vue_type_script_setup_true_lang-DMkOfPu9.js";import{_ as C}from"./AuthLayout.vue_vue_type_script_setup_true_lang-DTkMVYm5.js";import{d as q,g,o as _,w as d,e as t,u as o,h as v,j as $,m as N,b as m,i,k}from"./app-KXUNt_n9.js";import{L as P}from"./loader-circle-nLMSKP1C.js";import"./useForwardExpose-B0NY7lip.js";import"./createLucideIcon-CFEmdjHu.js";const a=e=>({url:a.url(e),method:"get"});a.definition={methods:["get","head"],url:"/register"};a.url=e=>a.definition.url+w(e);a.get=e=>({url:a.url(e),method:"get"});a.head=e=>({url:a.url(e),method:"head"});const f=e=>({action:a.url(e),method:"get"});f.get=e=>({action:a.url(e),method:"get"});f.head=e=>({action:a.url({[e?.mergeQuery?"mergeQuery":"query"]:{_method:"HEAD",...e?.query??e?.mergeQuery??{}}}),method:"get"});a.form=f;const r=e=>({url:r.url(e),method:"post"});r.definition={methods:["post"],url:"/register"};r.url=e=>r.definition.url+w(e);r.post=e=>({url:r.url(e),method:"post"});const h=e=>({action:r.url(e),method:"post"});h.post=e=>({action:r.url(e),method:"post"});r.form=h;const V={create:a,store:r},B={class:"grid gap-6"},E={class:"grid gap-2"},F={class:"grid gap-2"},L={class:"grid gap-2"},Q={class:"grid gap-2"},R={class:"text-center text-sm text-muted-foreground"},O=q({__name:"Register",setup(e){return(A,s)=>(_(),g(C,{title:"Create an account",description:"Enter your details below to create your account"},{default:d(()=>[t(o(v),{title:"Register"}),t(o($),N(o(V).store.form(),{"reset-on-success":["password","password_confirmation"],class:"flex flex-col gap-6"}),{default:d(({errors:n,processing:c})=>[m("div",B,[m("div",E,[t(o(p),{for:"name"},{default:d(()=>[...s[0]||(s[0]=[i("Name",-1)])]),_:1}),t(o(u),{id:"name",type:"text",required:"",autofocus:"",tabindex:1,autocomplete:"name",name:"name",placeholder:"Full name"}),t(l,{message:n.name},null,8,["message"])]),m("div",F,[t(o(p),{for:"email"},{default:d(()=>[...s[1]||(s[1]=[i("Email address",-1)])]),_:1}),t(o(u),{id:"email",type:"email",required:"",tabindex:2,autocomplete:"email",name:"email",placeholder:"email@example.com"}),t(l,{message:n.email},null,8,["message"])]),m("div",L,[t(o(p),{for:"password"},{default:d(()=>[...s[2]||(s[2]=[i("Password",-1)])]),_:1}),t(o(u),{id:"password",type:"password",required:"",tabindex:3,autocomplete:"new-password",name:"password",placeholder:"Password"}),t(l,{message:n.password},null,8,["message"])]),m("div",Q,[t(o(p),{for:"password_confirmation"},{default:d(()=>[...s[3]||(s[3]=[i("Confirm password",-1)])]),_:1}),t(o(u),{id:"password_confirmation",type:"password",required:"",tabindex:4,autocomplete:"new-password",name:"password_confirmation",placeholder:"Confirm password"}),t(l,{message:n.password_confirmation},null,8,["message"])]),t(o(b),{type:"submit",class:"mt-2 w-full",tabindex:"5",disabled:c,"data-test":"register-user-button"},{default:d(()=>[c?(_(),g(o(P),{key:0,class:"h-4 w-4 animate-spin"})):k("",!0),s[4]||(s[4]=i(" Create account ",-1))]),_:2},1032,["disabled"])]),m("div",R,[s[6]||(s[6]=i(" Already have an account? ",-1)),t(y,{href:o(x)(),class:"underline underline-offset-4",tabindex:6},{default:d(()=>[...s[5]||(s[5]=[i("Log in",-1)])]),_:1},8,["href"])])]),_:1},16)]),_:1}))}});export{O as default};
