import {J,U as RN,dt as Mr,c as tS,f as QT,dO as W1,e1 as j1,iD as Pg,a1 as Ny,a4 as Sy,cF as rD}from'./main-WUGO6e7n.js';var w,M=J(()=>{RN();Mr();tS();Mr();w=(()=>{class i{constructor(){this.riskLevel=0,this.tooltipText="",this.riskColor="";}ngOnInit(){this.setRiskColor();}ngOnChanges(o){o.riskLevel&&this.setRiskColor();}setRiskColor(){let o=[{offset:0,color:{r:18,g:152,b:6}},{offset:.25,color:{r:63,g:191,b:8}},{offset:.5,color:{r:215,g:191,b:9}},{offset:.75,color:{r:230,g:124,b:10}},{offset:1,color:{r:211,g:9,b:9}}],e=Math.max(0,Math.min(100,this.riskLevel))/100,l=0;for(let s=0;s<o.length-1;s++)if(e>=o[s].offset&&e<=o[s+1].offset){l=s;break}let t=o[l],n=o[l+1],a=n.offset-t.offset,c=a>0?(e-t.offset)/a:0,u=Math.round(t.color.r+(n.color.r-t.color.r)*c),C=Math.round(t.color.g+(n.color.g-t.color.g)*c),b=Math.round(t.color.b+(n.color.b-t.color.b)*c);this.riskColor=`#${u.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}${b.toString(16).padStart(2,"0")}`.toUpperCase();}static{this.\u0275fac=function(r){return new(r||i)};}static{this.\u0275cmp=QT({type:i,selectors:[["dvls-privileged-access-risk-level-tag"]],inputs:{riskLevel:"riskLevel",tooltipText:"tooltipText"},features:[rD],decls:1,vars:4,consts:[["textColor","#fff",3,"severity","label","pTooltip","backgroundColor"]],template:function(r,e){r&1&&Ny(0,"dvl-tag",0),r&2&&Sy("severity","info")("label",e.riskLevel?.toString()??"N/A")("pTooltip",e.tooltipText)("backgroundColor",e.riskColor);},dependencies:[W1,j1,Pg],encapsulation:2,changeDetection:1});}}return i})();});export{M,w};