import{_ as e,a as t,i as n,o as r,p as i,s as a}from"./i18n-DfIivedY.js";import{t as o}from"./password-input-Ch4XbVtj.js";import{n as s}from"./wayfinder-DeeEoT8U.js";import{Dt as c,Et as l,Z as u}from"./app-BUWZBqJJ.js";import{t as d}from"./label-DKp4ZT7r.js";import{t as f}from"./input-error-DINAq-Y-.js";import{a as p,c as m,i as h,n as g,r as _}from"./styles-CjVbMPwe.js";import{t as v}from"./spinner-zY0Cj43D.js";import{t as y}from"./text-link-CVuHBE-P.js";var b=e(),x=e=>({url:x.url(e),method:`post`});x.definition={methods:[`post`],url:`/register`},x.url=e=>x.definition.url+s(e),x.post=e=>({url:x.url(e),method:`post`});var S=e=>({action:x.url(e),method:`post`});S.post=e=>({action:x.url(e),method:`post`}),x.form=S,Object.assign(x,x);var C=t();function w(){let e=(0,b.c)(12),{t}=n(),{startDomain:s}=i().props,S;e[0]===t?S=e[1]:(S=t(`Register`),e[0]=t,e[1]=S);let w;e[2]===S?w=e[3]:(w=(0,C.jsx)(a,{title:S}),e[2]=S,e[3]=w);let T,E;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(T=x.form(),E=[`password`,`password_confirmation`],e[4]=T,e[5]=E):(T=e[4],E=e[5]);let D;e[6]!==s||e[7]!==t?(D=(0,C.jsx)(r,{...T,resetOnSuccess:E,disableWhileProcessing:!0,className:`grid gap-6`,children:e=>{let{processing:n,errors:r}=e;return(0,C.jsxs)(C.Fragment,{children:[s&&(0,C.jsx)(`input`,{type:`hidden`,name:`domain`,value:s}),s&&(0,C.jsxs)(`p`,{className:`rounded-lg border border-[#d5ddca] bg-[#eef2e8] px-4 py-3 text-sm font-medium text-[#315f42] text-xs`,children:[t(`After signup we'll start crawling`),` `,(0,C.jsx)(`strong`,{className:`font-medium`,children:s}),` `,t(`automatically.`)]}),(0,C.jsxs)(`div`,{className:`grid gap-5`,children:[(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[(0,C.jsx)(d,{htmlFor:`name`,className:h,children:t(`Name`)}),(0,C.jsx)(l,{id:`name`,type:`text`,required:!0,autoFocus:!0,tabIndex:1,autoComplete:`name`,name:`name`,placeholder:t(`Full name`),className:_}),(0,C.jsx)(f,{message:r.name})]}),(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[(0,C.jsx)(d,{htmlFor:`email`,className:h,children:t(`Email address`)}),(0,C.jsx)(l,{id:`email`,type:`email`,required:!0,tabIndex:2,autoComplete:`email`,name:`email`,placeholder:`email@example.com`,className:_}),(0,C.jsx)(f,{message:r.email})]}),(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[(0,C.jsx)(d,{htmlFor:`password`,className:h,children:t(`Password`)}),(0,C.jsx)(o,{id:`password`,required:!0,tabIndex:3,autoComplete:`new-password`,name:`password`,placeholder:t(`Password`),className:_}),(0,C.jsx)(f,{message:r.password})]}),(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[(0,C.jsx)(d,{htmlFor:`password_confirmation`,className:h,children:t(`Confirm password`)}),(0,C.jsx)(o,{id:`password_confirmation`,required:!0,tabIndex:4,autoComplete:`new-password`,name:`password_confirmation`,placeholder:t(`Confirm password`),className:_}),(0,C.jsx)(f,{message:r.password_confirmation})]}),(0,C.jsxs)(c,{type:`submit`,className:`${m} mt-1 w-full`,tabIndex:5,"data-test":`register-user-button`,children:[n&&(0,C.jsx)(v,{}),t(`Create account`)]})]}),(0,C.jsxs)(`div`,{className:`text-center ${g}`,children:[t(`Already have an account?`),` `,(0,C.jsx)(y,{href:u(),tabIndex:6,className:p,children:t(`Log in`)})]})]})}}),e[6]=s,e[7]=t,e[8]=D):D=e[8];let O;return e[9]!==w||e[10]!==D?(O=(0,C.jsxs)(C.Fragment,{children:[w,D]}),e[9]=w,e[10]=D,e[11]=O):O=e[11],O}w.layout={title:`Create an account`,description:`Enter your details below to create your account`};export{w as default};