import{kf as r,lf as P}from"./chunk-XBRJZCAD.js";import{b,c as f}from"./chunk-IOINCEV4.js";import{Ac as S,Eb as l,Gd as C,Ia as d,Ob as g,Rc as m,Tb as c,Tc as v,ec as h,fc as o,lc as w,qc as i,rc as p,sc as u,zb as e}from"./chunk-JSJB5BKT.js";import{e as y}from"./chunk-SZAW6ZBW.js";function k(s,D){if(s&1&&(i(0,"div",3),m(1),p()),s&2){let n=S();o("color",n.passwordStrengthColor),e(),v(" ",n.passwordStrengthDisplayValue," ")}}var O,_=y(()=>{P();C();f();O=(()=>{class s{constructor(n){this.translatorService=n,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(n){this.setColor(),this.setDisplayValues()}static{this.\u0275fac=function(a){return new(a||s)(l(b))}}static{this.\u0275cmp=g({type:s,selectors:[["sd-password-strength-bar"]],inputs:{passwordStrength:"passwordStrength"},features:[d],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(a,t){a&1&&(i(0,"div",0),u(1,"div",1)(2,"div",1)(3,"div",1)(4,"div",1)(5,"div",1),p(),c(6,k,2,3,"div",2)),a&2&&(h("title",t.passwordStrengthDisplayValue),e(),o("background-color",t.passwordStrength>=0?t.passwordStrengthColor:"transparent"),e(),o("background-color",t.passwordStrength>=4?t.passwordStrengthColor:"transparent"),e(),o("background-color",t.passwordStrength>=5?t.passwordStrengthColor:"transparent"),e(),o("background-color",t.passwordStrength>=6?t.passwordStrengthColor:"transparent"),e(),o("background-color",t.passwordStrength>=7?t.passwordStrengthColor:"transparent"),e(),w(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}"]})}}return s})()});export{O as a,_ as b};
