1import{A as h,J as g,K as _,L as u,_ as D,M as V,c as b,o as m,b as s,x as a,G as v,v as i,w as X,d as k,u as B,N as I,O as C}from"./index-ae80RWzP.js";import{_ as p}from"./BaseInput-BByyJOvX.js";import"./question-DJwRJGH1.js";const E={components:{BaseInput:p,BaseButton:u},directives:{maska:_},data(){return{loading:!1,formData:{name:"",surname:"",lastname:"",inn:""},errors:{name:"",surname:"",lastname:"",inn:""}}},computed:{...h(g,["token"])},methods:{async createClient(){if(this.validateForm()){try{this.loading=!0,(await this.$axiosApi.post("gazprom-app/client",this.formData,{headers:{"auth-token":this.token}})).data&&this.$router.push("/profile")}catch(e){console.error(e)}this.loading=!1}},validateForm(){let e=!0;return this.errors={name:"",surname:"",lastname:"",inn:""},this.formData.name||(this.errors.name="ÐÑо поле обÑзаÑелÑно Ð´Ð»Ñ Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ",e=!1),this.formData.surname||(this.errors.surname="ÐÑо поле обÑзаÑелÑно Ð´Ð»Ñ Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ",e=!1),this.formData.lastname||(this.errors.lastname="ÐÑо поле обÑзаÑелÑно Ð´Ð»Ñ Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ",e=!1),this.formData.inn?this.formData.inn.length!==14&&(this.errors.inn="ÐÐРдолжен ÑоÑÑоÑÑÑ Ð¸Ð· 14 ÑиÑÑ",e=!1):(this.errors.inn="ÐÑо поле обÑзаÑелÑно Ð´Ð»Ñ Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ",e=!1),e},clearError(e){this.errors[e]=""}}},w={class:"container"},y={class:"error-msg"},U={class:"error-msg"},x={class:"error-msg"},N={class:"error-msg"};function S(e,r,A,F,n,o){const l=p,f=I,d=u,c=V("maska");return m(),b("div",w,[s("form",{class:"identification-form",onSubmit:r[8]||(r[8]=C((...t)=>o.createClient&&o.createClient(...t),["prevent"]))},[s("h3",null,i(e.$t("profile.identification.title")),1),a(l,{modelValue:n.formData.name,"onUpdate:modelValue":r[0]||(r[0]=t=>n.formData.name=t),error:!!n.errors.name,label:e.$t("profile.identification.inputs.name"),onInput:r[1]||(r[1]=t=>o.clearError("name"))},null,8,["modelValue","error","label"]),s("span",y,i(n.errors.name),1),a(l,{modelValue:n.formData.surname,"onUpdate:modelValue":r[2]||(r[2]=t=>n.formData.surname=t),error:!!n.errors.surname,label:e.$t("profile.identification.inputs.surname"),onInput:r[3]||(r[3]=t=>o.clearError("surname"))},null,8,["modelValue","error","label"]),s("span",U,i(n.errors.surname),1),a(l,{modelValue:n.formData.lastname,"onUpdate:modelValue":r[4]||(r[4]=t=>n.formData.lastname=t),error:!!n.errors.lastname,label:e.$t("profile.identification.inputs.lastname"),onInput:r[5]||(r[5]=t=>o.clearError("lastname"))},null,8,["modelValue","error","label"]),s("span",x,i(n.errors.lastname),1),v(a(l,{modelValue:n.formData.inn,"onUpdate:modelValue":r[6]||(r[6]=t=>n.formData.inn=t),error:!!n.errors.inn,type:"number",placeholder:"XXXXXXXXXXXXXX",label:e.$t("profile.identification.inputs.tin"),onInput:r[7]||(r[7]=t=>o.clearError("inn"))},null,8,["modelValue","error","label"]),[[c,"##############"]]),s("span",N,i(n.errors.inn),1),a(d,{text:n.loading?"":e.$t("profile.identification.buttons.submit"),bgColor:"#1852E0",style:{"margin-top":"40px !important","align-self":"stretch"}},{btnContent:X(()=>[n.loading?(m(),k(f,{key:0,loaderWidth:"10px",color:"white"})):B("",!0)]),_:1},8,["text"])],32)])}const G=D(E,[["render",S],["__scopeId","data-v-ee231529"]]);export{G as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.