import{_ as h}from"./ButtonDefault-CzWpVlv6.js";import{_ as x}from"./ClausesKeeper-CyJ_9bTp.js";import{_ as N}from"./BlockBalanceAgreement-396E9Da8.js";import{u as P,r as m,x as p,o as U,c as y,b as u,a as e,t as B,B as C,K as n,S as r,e as D}from"./index-Bb2UEb_P.js";import{u as E}from"./index-Dax_IkAt.js";import{_ as S}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./HtmlContent-DrkJBX3e.js";import"./IconCloseCircle-ctElXVvc.js";import"./clauses-Bhz_DuFa.js";import"./common-U_VzDrmL.js";const V={class:"create-referral"},k={class:"container"},A={class:"section-header"},$={class:"section-label"},I={class:"container"},R={class:"create-referral__data"},H={class:"form-field"},K={class:"form-field"},L={class:"form-field"},M={class:"form-field"},T={class:"container"},j={class:"create-referral__data"},q={__name:"DependUsersCreate",async setup(z){let a,l;const i=P(),c=E(),f=D(),d=m(!1),t=m({Email:"",Name:"",Password:"",_Password:""});[a,l]=p(()=>i.fetchUserData()),await a,l(),[a,l]=p(()=>c.fetchContracts()),await a,l();function v(){t.value.Email.length>0&&t.value.Password.length>0&&t.value.Name.length>0&&t.value._Password.length>0&&(d.value=!0,i.registerNewUser({...t.value}).then(_=>{const{response:s}=_;s==="success"&&f.push({path:"/Home"}),d.value=!1}))}return(_,s)=>{const w=N,b=x,g=h;return U(),y("div",V,[u(w),e("section",null,[e("div",k,[e("div",A,[s[5]||(s[5]=e("h1",{class:"section-title"},"Создать реферала",-1)),e("div",$,B(C(i).userInfo.Name),1)]),u(b)])]),e("section",null,[e("div",I,[e("div",R,[e("label",H,[s[6]||(s[6]=e("span",{class:"form-field__label"},"ФИО",-1)),n(e("input",{type:"text",placeholder:"","onUpdate:modelValue":s[0]||(s[0]=o=>t.value.Name=o)},null,512),[[r,t.value.Name]])]),e("label",K,[s[7]||(s[7]=e("span",{class:"form-field__label"},"Email",-1)),n(e("input",{type:"text","onUpdate:modelValue":s[1]||(s[1]=o=>t.value.Email=o)},null,512),[[r,t.value.Email]])]),e("label",L,[s[8]||(s[8]=e("span",{class:"form-field__label"},"Пароль",-1)),n(e("input",{type:"password","onUpdate:modelValue":s[2]||(s[2]=o=>t.value.Password=o)},null,512),[[r,t.value.Password]])]),e("label",M,[s[9]||(s[9]=e("span",{class:"form-field__label"},"Подтвердить пароль",-1)),n(e("input",{type:"password","onUpdate:modelValue":s[3]||(s[3]=o=>t.value._Password=o)},null,512),[[r,t.value._Password]])])])])]),e("section",null,[e("div",T,[e("div",j,[u(g,{class:"btn--wide",label:"Зарегистрировать","is-loading":d.value,onClick:s[4]||(s[4]=o=>v())},null,8,["is-loading"])])])])])}}},se=S(q,[["__scopeId","data-v-db354feb"]]);export{se as default};
