import{a as _,b as w,c as S}from"./chunk-J75YHVMQ.js";import{a as x,b as E}from"./chunk-TS62PHQY.js";import{b,c as P}from"./chunk-IOINCEV4.js";import{Ac as r,Eb as v,Gd as f,Ia as y,Ob as D,Rc as c,Sa as g,Sb as V,Sc as h,Tb as T,ec as s,gc as d,lc as p,qc as a,rc as l,sc as u,zb as e,zc as C}from"./chunk-JSJB5BKT.js";import{e as k}from"./chunk-SZAW6ZBW.js";function R(i,m){if(i&1&&(a(0,"div",2)(1,"label",3)(2,"span",4),c(3),l(),u(4,"i",5),l()()),i&2){let t=r();e(),d("no-data",!(t.roleDisplayValues!=null&&t.roleDisplayValues.length))("with-data",t.roleDisplayValues==null?null:t.roleDisplayValues.length),s("pTooltip",t.userGroupToolTip),e(2),h((t.roleDisplayValues==null?null:t.roleDisplayValues.length)||0)}}function U(i,m){if(i&1&&(a(0,"div",2)(1,"label",6)(2,"span",4),c(3),l(),u(4,"i",7),l()()),i&2){let t=r();e(),d("no-data",!(t.userDisplayValues!=null&&t.userDisplayValues.length))("with-data",t.userDisplayValues==null?null:t.userDisplayValues.length),s("pTooltip",t.userToolTip),e(2),h((t.userDisplayValues==null?null:t.userDisplayValues.length)||0)}}function L(i,m){if(i&1&&(a(0,"div",2)(1,"label",8)(2,"span",4),c(3),l(),u(4,"i",9),l()()),i&2){let t=r();e(),s("pTooltip",t.applicationToolTip),e(2),h((t.applicationsDisplayValues==null?null:t.applicationsDisplayValues.length)||0)}}function M(i,m){if(i&1&&(a(0,"div",2)(1,"label",3)(2,"span",4),c(3),l(),u(4,"i",10),l()()),i&2){let t=r();e(),d("no-data",!(t.vaultDisplayValues!=null&&t.vaultDisplayValues.length))("with-data",t.vaultDisplayValues==null?null:t.vaultDisplayValues.length),s("pTooltip",t.vaultTooltip),e(2),h((t.vaultDisplayValues==null?null:t.vaultDisplayValues.length)||0)}}var H,O=k(()=>{f();E();S();f();P();S();H=(()=>{class i extends x{constructor(t){super(),this.userDisplayValues=[],this.roleDisplayValues=[],this.applicationsDisplayValues=[],this.vaultDisplayValues=[],this.showRolesCount=!0,this.showUsersCount=!0,this.showVaultCount=!1,this.itemClick=new g,this.userLabel=t.translate("lblUsers"),this.userGroupLabel=t.translate("lblUserGroups"),this.applicationLabel=t.translate("mnuApplications"),this.vaultLabel=t.translate("lblVaults")}ngOnChanges(t){this.initToolTip()}onClick(){(this.roleDisplayValues?.length||this.userDisplayValues?.length||this.applicationsDisplayValues?.length||this.vaultDisplayValues?.length)&&this.itemClick?.emit()}initToolTip(){this.userToolTip=this.getUserTooltip(),this.userGroupToolTip=this.getUserGroupTooltip(),this.applicationToolTip=this.getApplicationTooltip(),this.vaultTooltip=this.getVaultTooltip()}getTooltip(t,o){return(o||[]).length>0?t+` (${(o||[]).length}):

`+(o||[]).map(n=>"\u2022 "+n).join(`
`):""}getUserTooltip(){return this.getTooltip(this.userLabel,this.userDisplayValues)}getUserGroupTooltip(){return this.getTooltip(this.userGroupLabel,this.roleDisplayValues)}getApplicationTooltip(){return this.getTooltip(this.applicationLabel,this.applicationsDisplayValues)}getVaultTooltip(){return this.getTooltip(this.vaultLabel,this.vaultDisplayValues)}static{this.\u0275fac=function(o){return new(o||i)(v(b))}}static{this.\u0275cmp=D({type:i,selectors:[["dvls-connection-security-right-details-summary"]],inputs:{userDisplayValues:"userDisplayValues",roleDisplayValues:"roleDisplayValues",applicationsDisplayValues:"applicationsDisplayValues",vaultDisplayValues:"vaultDisplayValues",showRolesCount:"showRolesCount",showUsersCount:"showUsersCount",showVaultCount:"showVaultCount"},outputs:{itemClick:"itemClick"},features:[V,y],decls:6,vars:4,consts:[[2,"width","100%"],[2,"display","flex","padding-left","20px","opacity","0.85",3,"click"],[2,"position","relative"],["tooltipPosition","bottom",1,"label",3,"pTooltip"],[1,"count-icon-notification"],[1,"dvl-icon","dvl-icon-roles","type-icon"],["tooltipPosition","bottom","tooltipStyleClass","users",1,"label",3,"pTooltip"],[1,"dvl-icon","dvl-icon-entry-SampleUser","type-icon"],["tooltipPosition","bottom",1,"label","with-data",3,"pTooltip"],[1,"dvl-icon","dvl-icon-entry-session-command-line","type-icon"],[1,"dvl-icon","dvl-icon-vault","type-icon"]],template:function(o,n){o&1&&(a(0,"div",0)(1,"div",1),C("click",function(){return n.onClick()}),T(2,R,5,6,"div",2)(3,U,5,6,"div",2)(4,L,5,2,"div",2)(5,M,5,6,"div",2),l()()),o&2&&(e(2),p(n.showRolesCount?2:-1),e(),p(n.showUsersCount?3:-1),e(),p((n.applicationsDisplayValues==null?null:n.applicationsDisplayValues.length)>0?4:-1),e(),p(n.showVaultCount?5:-1))},dependencies:[w,_],styles:[".label[_ngcontent-%COMP%]{align-items:center}.count-icon-notification[_ngcontent-%COMP%]{padding:4px 2px 2px;width:18px;font-size:10px;height:18px;border-radius:50%;background:#0068c3;color:#fff;font-weight:700;text-align:center;position:absolute;top:2px;left:10px}.no-data[_ngcontent-%COMP%]{opacity:.25;cursor:default}.with-data[_ngcontent-%COMP%]{cursor:pointer}.type-icon[_ngcontent-%COMP%]{padding-right:13px;font-size:20px}  .users.p-tooltip .p-tooltip-text{white-space:break-spaces;overflow:hidden}"]})}}return i})()});export{H as a,O as b};
