import{a as b,c as L}from"./chunk-BBCDWXOF.js";import{f as v,g as h,h as k}from"./chunk-ZBM6BFOI.js";import{Qb as g,Uc as m,Wa as a,be as y,tc as u,wc as d}from"./chunk-WL5U2YIT.js";import{e as S}from"./chunk-ADEKKGI2.js";var $,x=S(()=>{k();L();y();k();$=(()=>{let r=class r{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}}],t=Math.max(0,Math.min(100,this.riskLevel))/100,c=0;for(let i=0;i<o.length-1;i++)if(t>=o[i].offset&&t<=o[i+1].offset){c=i;break}let e=o[c],l=o[c+1],p=l.offset-e.offset,f=p>0?(t-e.offset)/p:0,C=Math.round(e.color.r+(l.color.r-e.color.r)*f),T=Math.round(e.color.g+(l.color.g-e.color.g)*f),M=Math.round(e.color.b+(l.color.b-e.color.b)*f);this.riskColor=`#${C.toString(16).padStart(2,"0")}${T.toString(16).padStart(2,"0")}${M.toString(16).padStart(2,"0")}`.toUpperCase()}};r.\u0275fac=function(s){return new(s||r)},r.\u0275cmp=g({type:r,selectors:[["dvls-privileged-access-risk-level-tag"]],inputs:{riskLevel:"riskLevel",tooltipText:"tooltipText"},features:[a],decls:1,vars:7,consts:[[3,"severity","value","pTooltip"]],template:function(s,t){s&1&&d(0,"p-tag",0),s&2&&(m("background-color",t.riskColor)("color","#fff"),u("severity","info")("value",(t.riskLevel==null?null:t.riskLevel.toString())??"N/A")("pTooltip",t.tooltipText))},dependencies:[h,v,b],encapsulation:2});let n=r;return n})()});export{$ as a,x as b};
