import{f as w,g as S,h as k}from"./chunk-ZBM6BFOI.js";import{a as b,b as P}from"./chunk-QGVT6DPT.js";import{b as _,c as U}from"./chunk-YBNTOQCK.js";import{Db as V,Hc as f,Jb as v,Jc as d,Qb as T,Ub as C,Vc as g,Wa as D,Yc as y,Zc as m,be as x,mc as u,oc as r,tc as c,uc as p,vc as o,wc as h,yb as e}from"./chunk-WL5U2YIT.js";import{e as E}from"./chunk-ADEKKGI2.js";function R(i,l){if(i&1&&(p(0,"div",2)(1,"label",3)(2,"span",4),y(3),o(),h(4,"i",5),o()()),i&2){let t=d();e(),g("no-data",!(t.roleDisplayValues!=null&&t.roleDisplayValues.length))("with-data",t.roleDisplayValues==null?null:t.roleDisplayValues.length),c("pTooltip",t.userGroupToolTip),e(2),m((t.roleDisplayValues==null?null:t.roleDisplayValues.length)||0)}}function L(i,l){if(i&1&&(p(0,"div",2)(1,"label",6)(2,"span",4),y(3),o(),h(4,"i",7),o()()),i&2){let t=d();e(),g("no-data",!(t.userDisplayValues!=null&&t.userDisplayValues.length))("with-data",t.userDisplayValues==null?null:t.userDisplayValues.length),c("pTooltip",t.userToolTip),e(2),m((t.userDisplayValues==null?null:t.userDisplayValues.length)||0)}}function M(i,l){if(i&1&&(p(0,"div",2)(1,"label",8)(2,"span",4),y(3),o(),h(4,"i",9),o()()),i&2){let t=d();e(),c("pTooltip",t.applicationToolTip),e(2),m((t.applicationsDisplayValues==null?null:t.applicationsDisplayValues.length)||0)}}function O(i,l){if(i&1&&(p(0,"div",2)(1,"label",3)(2,"span",4),y(3),o(),h(4,"i",10),o()()),i&2){let t=d();e(),g("no-data",!(t.vaultDisplayValues!=null&&t.vaultDisplayValues.length))("with-data",t.vaultDisplayValues==null?null:t.vaultDisplayValues.length),c("pTooltip",t.vaultTooltip),e(2),m((t.vaultDisplayValues==null?null:t.vaultDisplayValues.length)||0)}}var J,G=E(()=>{x();P();k();x();U();k();J=(()=>{let l=class l extends b{constructor(a){super(),this.userDisplayValues=[],this.roleDisplayValues=[],this.applicationsDisplayValues=[],this.vaultDisplayValues=[],this.showRolesCount=!0,this.showUsersCount=!0,this.showVaultCount=!1,this.itemClick=new V,this.userLabel=a.translate("lblUsers"),this.userGroupLabel=a.translate("lblUserGroups"),this.applicationLabel=a.translate("lblApplications"),this.vaultLabel=a.translate("lblVaults")}ngOnChanges(a){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(a,n){return(n||[]).length>0?a+` (${(n||[]).length}):

`+(n||[]).map(s=>"\u2022 "+s).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)}};l.\u0275fac=function(n){return new(n||l)(v(_))},l.\u0275cmp=T({type:l,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:[C,D],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(n,s){n&1&&(p(0,"div",0)(1,"div",1),f("click",function(){return s.onClick()}),u(2,R,5,6,"div",2),u(3,L,5,6,"div",2),u(4,M,5,2,"div",2),u(5,O,5,6,"div",2),o()()),n&2&&(e(2),r(s.showRolesCount?2:-1),e(),r(s.showUsersCount?3:-1),e(),r((s.applicationsDisplayValues==null?null:s.applicationsDisplayValues.length)>0?4:-1),e(),r(s.showVaultCount?5:-1))},dependencies:[S,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}"]});let i=l;return i})()});export{J as a,G as b};
