import{wa as _,xa as w,ya as S}from"./chunk-VYRWAFSM.js";import{a as x,b as E}from"./chunk-UIVS6623.js";import{b,c as P}from"./chunk-YTY7HHO3.js";import{Ab as e,Fb as D,Gc as C,Hc as r,Ia as y,Qb as V,Rd as f,Ta as g,Ub as v,Wb as T,Zc as c,_c as h,jc as s,lc as d,rc as p,wc as n,xc as l,yc as u}from"./chunk-4HFZZ7HS.js";import{e as k}from"./chunk-SZAW6ZBW.js";function R(i,m){if(i&1&&(n(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&&(n(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&&(n(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&&(n(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("lblApplications"),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(a=>"\u2022 "+a).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)(D(b))}}static{this.\u0275cmp=V({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,"di","dvl-icon-roles","type-icon"],["tooltipPosition","bottom","tooltipStyleClass","users",1,"label",3,"pTooltip"],[1,"di","dvl-icon-entry-SampleUser","type-icon"],["tooltipPosition","bottom",1,"label","with-data",3,"pTooltip"],[1,"di","dvl-icon-entry-session-command-line","type-icon"],[1,"di","dvl-icon-vault","type-icon"]],template:function(o,a){o&1&&(n(0,"div",0)(1,"div",1),C("click",function(){return a.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(a.showRolesCount?2:-1),e(),p(a.showUsersCount?3:-1),e(),p((a.applicationsDisplayValues==null?null:a.applicationsDisplayValues.length)>0?4:-1),e(),p(a.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};
