import{m as x,F as B}from"./app.703b5361.js";import{d as I,r as i,c as n,e as a,f as o,k as m,m as V,F as C,N as F,p as N,j as M,J as P,D as S,_ as z}from"./windi.6302481f.js";const A={key:0,class:"flex flex-col gap-y-px py-qr"},L={key:0,class:"i-mdi-checkbox-blank-circle-outline"},T={key:1,class:"i-mdi-check-circle"},U=I({__name:"password-input",props:{create:{type:Boolean},showInvalid:{type:Boolean},password:{},label:{}},emits:["blur:custom","focus:custom","update:password"],setup(h,{expose:_,emit:v}){const w=h,l=v,r=i(!0),u=i(!1),f=n(()=>r.value?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022":"hunter2"),c=n(()=>{const e=w.password||"";return[{label:"Uppercase letter",has:/[A-Z]/.test(e)},{label:"Lowercase letter",has:/[a-z]/.test(e)},{label:"Number",has:/[0-9]/.test(e)},{label:"Special character",has:/[^A-Za-z0-9]/.test(e)},{label:"At least 12 characters",has:e.length>=12}]}),d=n(()=>c.value.some(e=>!e.has)),b=e=>{r.value=e},g=e=>{l("focus:custom",e),u.value=!0};return _({invalid:d}),(e,t)=>{var p;const k=x,y=B;return a(),o("div",null,[m(k,{modelValue:e.password,"onUpdate:modelValue":t[0]||(t[0]=s=>l("update:password",s||"")),enablePassManager:"",iconRight:"",noCustom:"",oneLine:"",secret:"",label:(p=e.label)!=null?p:"Password",placeholder:f.value,"onUpdate:secretMode":b,"onBlur:custom":t[1]||(t[1]=s=>l("blur:custom",s)),"onFocus:custom":g,autocomplete:e.create?"off":"current-password",invalid:d.value&&e.showInvalid&&" "},null,8,["modelValue","label","placeholder","autocomplete","invalid"]),e.create?(a(),o("div",A,[m(y,{expanded:u.value||e.showInvalid},{default:V(()=>[(a(!0),o(C,null,F(c.value,s=>(a(),o("div",{class:N(["flex items-center gap-x-qr",{"text-red":!s.has&&e.showInvalid,"text-grey-500":!s.has&&!e.showInvalid,"text-grey-darker":s.has}])},[s.has?(a(),o("div",T)):(a(),o("div",L)),M("span",null,P(s.label),1)],2))),256))]),_:1},8,["expanded"])])):S("",!0)])}}}),E=z(U,[["__file","password-input.vue"]]);export{E as _};