import{d as g,x as w,a as p,o as u,w as t,g as a,j as i,u as e,i as x,f as V,l,b as c}from"./app-Cb9hmj6k.js";import{_ as d}from"./InputError.vue_vue_type_script_setup_true_lang-C7IEX2zR.js";import{_ as b}from"./TextLink.vue_vue_type_script_setup_true_lang-B1XyL2_M.js";import{_ as v}from"./AppLogoIcon.vue_vue_type_script_setup_true_lang-DKWl2XLX.js";import{_ as m}from"./Input.vue_vue_type_script_setup_true_lang-t_rUv_4v.js";import{_ as n}from"./Label.vue_vue_type_script_setup_true_lang-CCRw-4E2.js";import{L as y,_ as $}from"./AuthLayout.vue_vue_type_script_setup_true_lang-BIusrmve.js";import"./index-hboZUdbT.js";const q={class:"grid gap-6"},C={class:"grid gap-2"},N={class:"grid gap-2"},U={class:"grid gap-2"},k={class:"grid gap-2"},B={class:"text-center text-sm text-muted-foreground"},D=g({__name:"Register",setup(L){const o=w({name:"",email:"",password:"",password_confirmation:""}),f=()=>{o.post(route("register"),{onFinish:()=>o.reset("password","password_confirmation")})};return(_,s)=>(u(),p($,{title:"Завести аккаунт",description:"Введите ниже свои данные, чтобы создать учетную запись"},{default:t(()=>[a(e(x),{title:"Зарегистрироваться"}),i("form",{onSubmit:V(f,["prevent"]),class:"flex flex-col gap-6"},[i("div",q,[i("div",C,[a(e(n),{for:"name"},{default:t(()=>s[4]||(s[4]=[l("Имя")])),_:1,__:[4]}),a(e(m),{id:"name",type:"text",required:"",autofocus:"",tabindex:1,autocomplete:"name",modelValue:e(o).name,"onUpdate:modelValue":s[0]||(s[0]=r=>e(o).name=r),placeholder:"Полное имя"},null,8,["modelValue"]),a(d,{message:e(o).errors.name},null,8,["message"])]),i("div",N,[a(e(n),{for:"email"},{default:t(()=>s[5]||(s[5]=[l("Адрес электронной почты")])),_:1,__:[5]}),a(e(m),{id:"email",type:"email",required:"",tabindex:2,autocomplete:"email",modelValue:e(o).email,"onUpdate:modelValue":s[1]||(s[1]=r=>e(o).email=r),placeholder:"email@example.com"},null,8,["modelValue"]),a(d,{message:e(o).errors.email},null,8,["message"])]),i("div",U,[a(e(n),{for:"password"},{default:t(()=>s[6]||(s[6]=[l("Пароль")])),_:1,__:[6]}),a(e(m),{id:"password",type:"password",required:"",tabindex:3,autocomplete:"new-password",modelValue:e(o).password,"onUpdate:modelValue":s[2]||(s[2]=r=>e(o).password=r),placeholder:"Пароль"},null,8,["modelValue"]),a(d,{message:e(o).errors.password},null,8,["message"])]),i("div",k,[a(e(n),{for:"password_confirmation"},{default:t(()=>s[7]||(s[7]=[l("Подтвердите пароль")])),_:1,__:[7]}),a(e(m),{id:"password_confirmation",type:"password",required:"",tabindex:4,autocomplete:"new-password",modelValue:e(o).password_confirmation,"onUpdate:modelValue":s[3]||(s[3]=r=>e(o).password_confirmation=r),placeholder:"Подтвердите пароль"},null,8,["modelValue"]),a(d,{message:e(o).errors.password_confirmation},null,8,["message"])]),a(e(v),{type:"submit",class:"mt-2 w-full",tabindex:"5",disabled:e(o).processing},{default:t(()=>[e(o).processing?(u(),p(e(y),{key:0,class:"h-4 w-4 animate-spin"})):c("",!0),s[8]||(s[8]=l(" Зарегистрироваться "))]),_:1,__:[8]},8,["disabled"])]),i("div",B,[s[10]||(s[10]=l(" У вас уже есть аккаунт? ")),a(b,{href:_.route("login"),class:"underline underline-offset-4",tabindex:6},{default:t(()=>s[9]||(s[9]=[l("Авторизоваться")])),_:1,__:[9]},8,["href"])])],32)]),_:1}))}});export{D as default};
