import{_ as l,c as n,b as r,G as t,ag as w,D as i,o as c}from"./Bgmy51Qv.js";const u={name:"PasswordField",data(){return{password:"",passwordFieldType:"password"}},props:{isInvalid:{type:Boolean,default:!1},value:{type:String}},watch:{value(d){this.password=d}},mixins:[],components:{},computed:{isPasswordTypePassword(){return this.passwordFieldType==="password"}},methods:{passwordChanged(){this.$emit("change-password",this.password)},passwordFieldToggle(){this.isPasswordTypePassword?this.passwordFieldType="text":this.passwordFieldType="password"}},mounted(){this.password=this.value}},m={class:"icon-input right-icon"},h=["type","placeholder"];function y(d,s,p,g,a,e){return c(),n("div",m,[s[3]||(s[3]=r("i",{class:"icon password-icon"},null,-1)),t(r("input",{type:a.passwordFieldType,placeholder:d.$t("user.pass"),"onUpdate:modelValue":s[0]||(s[0]=o=>a.password=o),class:i({invalid:!a.password||p.isInvalid}),onChange:s[1]||(s[1]=(...o)=>e.passwordChanged&&e.passwordChanged(...o))},null,42,h),[[w,a.password,void 0,{trim:!0}]]),r("i",{class:i(["icon",e.isPasswordTypePassword?"eye-close-icon":"eye-icon"]),onClick:s[2]||(s[2]=(...o)=>e.passwordFieldToggle&&e.passwordFieldToggle(...o))},null,2)])}const v=l(u,[["render",y]]);export{v as _};
