import{Yf as r,Zf as E}from"./chunk-BPZQKZKD.js";import{b as C,c as k}from"./chunk-YBNTOQCK.js";import{Ec as S,Jb as c,Jc as v,Qb as h,Uc as n,Wa as g,Yc as b,_c as y,be as P,mc as w,oc as u,xc as d,yb as e,yc as p,zc as m}from"./chunk-WL5U2YIT.js";import{e as f}from"./chunk-ADEKKGI2.js";function D(o,s){if(o&1&&(d(0,"div",3),b(1),p()),o&2){let l=v();n("color",l.passwordStrengthColor),e(),y(" ",l.passwordStrengthDisplayValue," ")}}var O,V=f(()=>{E();P();k();O=(()=>{let s=class s{constructor(a){this.translatorService=a,this.passwordStrengthDisplayValue="",this.passwordStrengthColor="rgb(255,0,0)"}setDisplayValues(){this.passwordStrengthDisplayValue=this.passwordStrength?this.translatorService.translateEnum(r,this.passwordStrength):""}setColor(){this.passwordStrengthColor=(()=>{switch(this.passwordStrength){case r.Forbidden:return"var(--grey-primary)";case r.PopularPassword:return"rgb(30, 144, 255)";case r.VeryWeak:return"rgb(239, 83, 80)";case r.Weak:return"rgb(246, 168, 33)";case r.Good:return"rgb(255, 200, 0)";case r.Strong:return"rgb(110, 188, 59)";case r.VeryStrong:return"rgb(50, 100, 25)";case r.Perfect:return"rgb(0, 102, 0)";default:return"transparent"}})()}ngOnChanges(a){this.setColor(),this.setDisplayValues()}};s.\u0275fac=function(i){return new(i||s)(c(C))},s.\u0275cmp=h({type:s,selectors:[["sd-password-strength-bar"]],inputs:{passwordStrength:"passwordStrength"},features:[g],decls:7,vars:12,consts:[[1,"password-strength-bar",3,"title"],[1,"password-strength-bar-increment"],[1,"password-strength-caption",3,"color"],[1,"password-strength-caption"]],template:function(i,t){i&1&&(d(0,"div",0),m(1,"div",1)(2,"div",1)(3,"div",1)(4,"div",1)(5,"div",1),p(),w(6,D,2,3,"div",2)),i&2&&(S("title",t.passwordStrengthDisplayValue),e(),n("background-color",t.passwordStrength>=0?t.passwordStrengthColor:"transparent"),e(),n("background-color",t.passwordStrength>=4?t.passwordStrengthColor:"transparent"),e(),n("background-color",t.passwordStrength>=5?t.passwordStrengthColor:"transparent"),e(),n("background-color",t.passwordStrength>=6?t.passwordStrengthColor:"transparent"),e(),n("background-color",t.passwordStrength>=7?t.passwordStrengthColor:"transparent"),e(),u(t.passwordStrength>0?6:-1))},styles:[".password-strength-caption[_ngcontent-%COMP%]{vertical-align:text-top;padding-top:2px;line-height:15px;text-align:left}.password-strength-bar-increment[_ngcontent-%COMP%]{flex:1;height:5px;display:inline-block;transition:background-color .2s ease-in-out}.password-strength-bar-increment[_ngcontent-%COMP%]{margin-left:2px;border:1px solid var(--password-strenght-border-color)}.password-strength-bar[_ngcontent-%COMP%]{margin-top:5px;display:flex}"]});let o=s;return o})()});export{O as a,V as b};
