import {J,k6 as Sl,c as tS,H as ul,k8 as x,w as wo,N as Sr,f as QT,q as qu,g as xy,W as Wu,bp as QC,B as ky,A as Iw,cd as Gy,br as ZC,cF as rD,v as W_,bz as f_,C as Qu}from'./main-WUGO6e7n.js';function D(n,E){if(n&1&&(qu(0,"div",3),W_(1),Wu()),n&2){let s=f_();Gy("color",s.passwordStrengthColor),Iw(),Qu(" ",s.passwordStrengthDisplayValue," ");}}var M,k=J(()=>{Sl();tS();ul();M=(()=>{class n{constructor(s){this.translatorService=s,this.passwordStrengthDisplayValue="",this.passwordStrengthColor="rgb(255,0,0)";}setDisplayValues(){this.passwordStrengthDisplayValue=this.passwordStrength?this.translatorService.translateEnum(x,this.passwordStrength):"";}setColor(){this.passwordStrengthColor=(()=>{switch(this.passwordStrength){case x.Forbidden:return "var(--grey-primary)";case x.PopularPassword:return "rgb(30, 144, 255)";case x.VeryWeak:return "rgb(239, 83, 80)";case x.Weak:return "rgb(246, 168, 33)";case x.Good:return "rgb(255, 200, 0)";case x.Strong:return "rgb(110, 188, 59)";case x.VeryStrong:return "rgb(50, 100, 25)";case x.Perfect:return "rgb(0, 102, 0)";default:return "transparent"}})();}ngOnChanges(s){this.setColor(),this.setDisplayValues();}static{this.\u0275fac=function(a){return new(a||n)(wo(Sr))};}static{this.\u0275cmp=QT({type:n,selectors:[["sd-password-strength-bar"]],inputs:{passwordStrength:"passwordStrength"},features:[rD],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&&(qu(0,"div",0),xy(1,"div",1)(2,"div",1)(3,"div",1)(4,"div",1)(5,"div",1),Wu(),QC(6,D,2,3,"div",2)),a&2&&(ky("title",t.passwordStrengthDisplayValue),Iw(),Gy("background-color",t.passwordStrength>=0?t.passwordStrengthColor:"transparent"),Iw(),Gy("background-color",t.passwordStrength>=4?t.passwordStrengthColor:"transparent"),Iw(),Gy("background-color",t.passwordStrength>=5?t.passwordStrengthColor:"transparent"),Iw(),Gy("background-color",t.passwordStrength>=6?t.passwordStrengthColor:"transparent"),Iw(),Gy("background-color",t.passwordStrength>=7?t.passwordStrengthColor:"transparent"),Iw(),ZC(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}"],changeDetection:1});}}return n})();});export{M,k};