import {J as J$1,c as tS,cI as p,dt as Mr,H as ul,cN as g,by as it,w as wo,N as Sr,f as QT,dO as W1,e1 as j1,a0 as ks,a3 as Py,bp as QC,a2 as Uu,A as Iw,br as ZC,bu as dy,cF as rD,v as W_,a1 as Ny,bz as f_,ce as zy,a4 as Sy,c2 as iv}from'./main-WUGO6e7n.js';function R(i,y){if(i&1&&(ks(0,"div",2)(1,"label",3)(2,"span",4),W_(3),Uu(),Ny(4,"i",5),Uu()()),i&2){let t=f_();Iw(),zy("no-data",!t.roleDisplayValues?.length)("with-data",t.roleDisplayValues?.length),Sy("pTooltip",t.userGroupToolTip),Iw(2),iv(t.roleDisplayValues?.length||0);}}function U(i,y){if(i&1&&(ks(0,"div",2)(1,"label",6)(2,"span",4),W_(3),Uu(),Ny(4,"i",7),Uu()()),i&2){let t=f_();Iw(),zy("no-data",!t.userDisplayValues?.length)("with-data",t.userDisplayValues?.length),Sy("pTooltip",t.userToolTip),Iw(2),iv(t.userDisplayValues?.length||0);}}function L(i,y){if(i&1&&(ks(0,"div",2)(1,"label",8)(2,"span",4),W_(3),Uu(),Ny(4,"i",9),Uu()()),i&2){let t=f_();Iw(),Sy("pTooltip",t.applicationToolTip),Iw(2),iv(t.applicationsDisplayValues?.length||0);}}function M(i,y){if(i&1&&(ks(0,"div",2)(1,"label",3)(2,"span",4),W_(3),Uu(),Ny(4,"i",10),Uu()()),i&2){let t=f_();Iw(),zy("no-data",!t.vaultDisplayValues?.length)("with-data",t.vaultDisplayValues?.length),Sy("pTooltip",t.vaultTooltip),Iw(2),iv(t.vaultDisplayValues?.length||0);}}var J,O=J$1(()=>{tS();p();Mr();tS();ul();Mr();J=(()=>{class i extends g{constructor(t){super(),this.userDisplayValues=[],this.roleDisplayValues=[],this.applicationsDisplayValues=[],this.vaultDisplayValues=[],this.showRolesCount=!0,this.showUsersCount=!0,this.showVaultCount=!1,this.itemClick=new it,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,l){return (l||[]).length>0?t+` (${(l||[]).length}):

`+(l||[]).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(l){return new(l||i)(wo(Sr))};}static{this.\u0275cmp=QT({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:[dy,rD],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(l,n){l&1&&(ks(0,"div",0)(1,"div",1),Py("click",function(){return n.onClick()}),QC(2,R,5,6,"div",2),QC(3,U,5,6,"div",2),QC(4,L,5,2,"div",2),QC(5,M,5,6,"div",2),Uu()()),l&2&&(Iw(2),ZC(n.showRolesCount?2:-1),Iw(),ZC(n.showUsersCount?3:-1),Iw(),ZC(n.applicationsDisplayValues?.length>0?4:-1),Iw(),ZC(n.showVaultCount?5:-1));},dependencies:[W1,j1],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}"],changeDetection:1});}}return i})();});export{J,O};