import{_ as x}from"./Mx_fKW6J.js";import y from"./CqPDWigg.js";import{d as $,b2 as b,r as g,a as B,b3 as k,e as C,f as m,h as d,x as h,i,v as p,g as t,aI as q,z as M,C as N,D as U,o as c,_ as A}from"./BxiWQxwE.js";import"./Bv_e0HF7.js";const D={class:"account__change-password"},F={class:"heading s"},I={class:"form__input"},P={for:"account-email"},S=["aria-label"],T={key:0},j={class:"passwords"},z=$({__name:"change-password",props:b({email:{type:String,required:!0},errors:{type:Object,required:!0},matches:{type:Boolean,required:!1,default:!1},expand:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:b(["blur","focus"],["update:modelValue"]),setup(s,{emit:v}){const f=s,u=g(f.email),{$messages:a}=B(),r=g(f.expand),l=k(s,"modelValue"),n=v,w=C(()=>r.value?a("changePassword.close"):a("changePassword.title"));return(E,e)=>{const V=x,_=y;return c(),m("div",D,[d("h2",F,p(t(a)("registration.accountdata")),1),d("div",I,[d("label",P,p(t(a)("registration.form.labels.email"))+" * ",1),i(V,{id:"account-email",modelValue:t(u),"onUpdate:modelValue":e[0]||(e[0]=o=>q(u)?u.value=o:null),disabled:!0,autocomplete:"email",type:"email",placeholder:t(a)("registration.form.placeholders.email")},null,8,["modelValue","placeholder"])]),s.expand?h("",!0):(c(),m("button",{key:0,type:"button",class:"button button--link","aria-label":t(w),onClick:e[1]||(e[1]=M(o=>r.value=!t(r),["prevent"]))},p(t(w)),9,S)),i(U,{name:"slide-down-fade"},{default:N(()=>[t(r)?(c(),m("div",T,[d("div",j,[i(_,{id:"password-current",modelValue:l.value.current,"onUpdate:modelValue":e[2]||(e[2]=o=>l.value.current=o),label:`${t(a)("registration.form.labels.password.current")} *`,placeholder:`${t(a)("registration.form.placeholders.password.current")}`,autocomplete:"current-password",error:s.errors.current,onBlur:e[3]||(e[3]=o=>n("blur",o)),onFocus:e[4]||(e[4]=o=>n("focus",o))},null,8,["modelValue","label","placeholder","error"]),i(_,{id:"password-new",modelValue:l.value.new,"onUpdate:modelValue":e[5]||(e[5]=o=>l.value.new=o),label:`${t(a)("registration.form.labels.password.new")} *`,placeholder:`${t(a)("registration.form.placeholders.password.new")}`,autocomplete:"new-password",hint:`${t(a)("registration.form.placeholders.password.hint")}`,error:s.errors.new,onBlur:e[6]||(e[6]=o=>n("blur",o)),onFocus:e[7]||(e[7]=o=>n("focus",o))},null,8,["modelValue","label","placeholder","hint","error"])])])):h("",!0)]),_:1})])}}}),J=A(z,[["__scopeId","data-v-30419ee1"]]);export{J as default};
