"use strict";(self["webpackChunkjandl"]=self["webpackChunkjandl"]||[]).push([[9396],{8099:function(){},9396:function(o,r,e){e.r(r),e.d(r,{default:function(){return P}});var a=e(3396),s=e(3369);const t={class:"auth-card"},n=(0,a._)("h1",null,"Resetovať heslo",-1),l=(0,a._)("p",{class:"mb-10"},"Overovací kód sme Vám odoslali na email. Môžete ho sem vložiť, alebo pokračovať pomocou odkazu v emaile.",-1);function i(o,r,e,i,m,d){const u=(0,a.up)("A-reset-password-form");return(0,a.wg)(),(0,a.j4)(s.K,null,{default:(0,a.w5)((()=>[(0,a._)("div",t,[n,l,(0,a.Wm)(u)])])),_:1})}var m=e(7139),d=e(870),u=e(6422),c=e(2900);const f={class:"d-flex flex-column"};function p(o,r,e,s,t,n){return(0,a.wg)(),(0,a.j4)(u.O,null,{default:(0,a.w5)((()=>[(0,a.Wm)(c.hw,{modelValue:t.form.code,"onUpdate:modelValue":r[0]||(r[0]=o=>t.form.code=o),label:"Kód",autocomplete:"one-time-code","bg-color":"white",variant:"solo",type:"number",class:(0,m.C_)(["mb-2",{error:t.v$.form.code.$errors.length}]),hint:t.v$.form.code.$errors?t.errorUtils.parseErrors(t.v$.form.code.$errors):null,counter:6},null,8,["modelValue","hint","class"]),(0,a.Wm)(c.hw,{modelValue:t.form.email,"onUpdate:modelValue":r[1]||(r[1]=o=>t.form.email=o),label:"E-mail",autocomplete:"email","bg-color":"white",variant:"solo",type:"email",class:(0,m.C_)(["mb-2",{error:t.v$.form.email.$errors.length}]),hint:t.v$.form.email.$errors?t.errorUtils.parseErrors(t.v$.form.email.$errors):null},null,8,["modelValue","hint","class"]),(0,a.Wm)(c.hw,{modelValue:t.form.password,"onUpdate:modelValue":r[2]||(r[2]=o=>t.form.password=o),label:"Heslo",autocomplete:"new-password","bg-color":"white",variant:"solo",type:t.showPassword?"text":"password",class:(0,m.C_)(["mb-2",{error:t.v$.form.password.$errors.length}]),hint:t.v$.form.password.$errors?t.errorUtils.parseErrors(t.v$.form.password.$errors):null,counter:8,"append-icon":t.showPassword?"mdi-eye":"mdi-eye-off","onClick:append":r[3]||(r[3]=o=>t.showPassword=!t.showPassword)},null,8,["modelValue","type","hint","class","append-icon"]),(0,a.Wm)(c.hw,{modelValue:t.form.password_confirmation,"onUpdate:modelValue":r[4]||(r[4]=o=>t.form.password_confirmation=o),autocomplete:"new-password","bg-color":"white",variant:"solo",label:"Potvrdenie hesla",type:t.showConfirmationPassword?"text":"password",counter:8,class:(0,m.C_)(["mb-2",{error:t.v$.form.password_confirmation.$errors.length}]),hint:t.v$.form.password_confirmation.$errors?t.errorUtils.parseErrors(t.v$.form.password_confirmation.$errors):null,"append-icon":t.showConfirmationPassword?"mdi-eye":"mdi-eye-off","onClick:append":r[5]||(r[5]=o=>t.showConfirmationPassword=!t.showConfirmationPassword)},null,8,["modelValue","type","hint","class","append-icon"]),(0,a._)("div",f,[(0,a.Wm)(d.T,{class:"button",color:"#7F39FB",onClick:r[6]||(r[6]=o=>n.submit())},{default:(0,a.w5)((()=>[(0,a.Uk)("Zmeniť heslo")])),_:1})])])),_:1})}e(7658);var h=e(3053),w=e(9117),v=e(7648),$=e(5941),b={data(){return{errorUtils:v.Z,v$:(0,h.ZP)(),form:{},showPassword:!1,showConfirmationPassword:!1}},validations(){return{form:{code:{required:w.C1,integer:w._L,minLength:(0,w.Ei)(6),maxLength:(0,w.BS)(6)},email:{required:w.C1,email:w.Do},password:{required:w.C1,minLength:(0,w.Ei)(8)},password_confirmation:{required:w.C1,minLength:(0,w.Ei)(8),sameAs:(0,w.sH)(this.form.password)}}}},methods:{async submit(){if(!await this.v$.$validate())return $.log(this.v$);try{await this.$axios.post_data("v1/auth/reset",this.form),this.$router.push({name:"Login"})}catch(o){this.$toast.error(o.data.error)}}}},C=e(89);const _=(0,C.Z)(b,[["render",p]]);var g=_,V={components:{AResetPasswordForm:g}};const y=(0,C.Z)(V,[["render",i]]);var P=y},6422:function(o,r,e){e.d(r,{O:function(){return m}});var a=e(3396),s=e(4357),t=e(3185),n=e(4870),l=e(320),i=e(9888);const m=(0,l.a)({name:"VForm",props:{...(0,s.vC)()},emits:{"update:modelValue":o=>!0,submit:o=>!0},setup(o,r){let{slots:e,emit:l}=r;const m=(0,s.Np)(o),d=(0,n.iH)();function u(o){o.preventDefault(),m.reset()}function c(o){const r=o,e=m.validate();r.then=e.then.bind(e),r.catch=e.catch.bind(e),r.finally=e.finally.bind(e),l("submit",r),r.defaultPrevented||e.then((o=>{let{valid:r}=o;var e;r&&(null==(e=d.value)||e.submit())})),r.preventDefault()}return(0,i.L)((()=>{var o;return(0,a.Wm)("form",{ref:d,class:"v-form",novalidate:!0,onReset:u,onSubmit:c},[null==(o=e.default)?void 0:o.call(e,m)])})),(0,t.F)(m,d)}})},3369:function(o,r,e){e.d(r,{K:function(){return l}});var a=e(3396),s=(e(8099),e(1138)),t=e(320),n=e(9888);const l=(0,t.a)({name:"VContainer",props:{fluid:{type:Boolean,default:!1},...(0,s.Q)()},setup(o,r){let{slots:e}=r;return(0,n.L)((()=>(0,a.Wm)(o.tag,{class:["v-container",{"v-container--fluid":o.fluid}]},e))),{}}})}}]); //# sourceMappingURL=9396.7e7861e1.js.map