import {u,g}from'./chunk-Bf2K6osz.js';import {J as J$1,c as tS,w as wo,f as QT,a0 as ks,cl as JC,dj as KC,a2 as Uu,A as Iw,cm as XC,cF as rD,G as vl,zz as q,dt as Mr,jF as Wr,zA as rt,dO as W1,e1 as j1,bp as QC,br as ZC,a4 as Sy,cg as J_,H as ul,bK as G$1,bJ as F,aa as ye,N as Sr,ad as ce,v as W_,bz as f_,c2 as iv,bk as i_,a3 as Py,a1 as Ny,T as P_,f1 as X_,bt as cM,K as Kg,bm as Bp,bo as $p}from'./main-WUGO6e7n.js';function Z(t,r){if(t&1&&Ny(0,"i"),t&2){let e=f_(2);P_(X_("dvl-icon ",e.item.icon," dvl-icon-lg"));}}function ee(t,r){if(t&1&&Ny(0,"svg-icon",6),t&2){let e=f_(2);Sy("src",J_(e.item.icon))("svgStyle",cM(3,Y));}}function te(t,r){if(t&1&&(ks(0,"a",0)(1,"div",4),QC(2,Z,1,3,"i",5)(3,ee,1,4,"svg-icon",6),Uu(),ks(4,"span",7),W_(5),Uu()()),t&2){let i=f_();Sy("routerLink",i.item.link)("queryParams",i.item.queryParams),Iw(2),ZC((i.item.svgIcon)===true?3:2),Iw(2),Sy("pTooltip",i.item.label),Iw(),iv(i.item.label);}}function ie(t,r){if(t&1&&Ny(0,"i"),t&2){let e=f_(2);P_(X_("dvl-icon ",e.item.icon," dvl-icon-lg"));}}function ne(t,r){if(t&1&&Ny(0,"svg-icon",8),t&2){let e=f_(2);Sy("src",J_(e.item.icon));}}function oe(t,r){if(t&1&&(ks(0,"a",2)(1,"div",4),QC(2,ie,1,3,"i",5)(3,ne,1,2,"svg-icon",8),Uu()()),t&2){let i=f_();Sy("href",i.item.externalLink,Kg),Iw(2),ZC((i.item.svgIcon)===true?3:2);}}function ae(t,r){if(t&1&&Ny(0,"i"),t&2){let e=f_(2);P_(X_("dvl-icon ",e.item.icon," dvl-icon-lg"));}}function re(t,r){if(t&1&&Ny(0,"svg-icon",8),t&2){let e=f_(2);Sy("src",J_(e.item.icon));}}function le(t,r){if(t&1){let e=i_();ks(0,"a",9),Py("click",function(){Bp(e);let o=f_();return $p(o.item.command())}),ks(1,"div",4),QC(2,ae,1,3,"i",5)(3,re,1,2,"svg-icon",8),Uu(),ks(4,"span",7),W_(5),Uu()();}if(t&2){let i=f_();Iw(2),ZC((i.item.svgIcon)===true?3:2),Iw(2),Sy("pTooltip",i.item.label),Iw(),iv(i.item.label);}}var Y,U,G=J$1(()=>{vl();q();Mr();u();tS();Mr();Y=()=>({"width.px":60,"height.%":100});U=(()=>{class t{ngOnChanges(e){if(e.item&&this.item){let i=Math.max(...(this.item.label||"").split(" ").map(o=>o.length));this.showDelay=i>10?0:1e3;}}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=QT({type:t,selectors:[["dvl-menu-dashboard-item"]],inputs:{item:"item"},features:[rD],decls:4,vars:6,consts:[["draggable","false",1,"dvl-section-report-item-link",3,"routerLink","queryParams"],["tooltipStyleClass","dvl-tooltip","tooltipPosition","bottom",3,"pTooltip","showDelay"],["draggable","false","target","_blank",1,"dvl-section-report-item-link",3,"href"],[1,"dvl-section-report-item-link"],[1,"dvl-section-report-item-icon"],[3,"class"],[1,"dvl-icon-lg",3,"svgStyle","src"],["dvlsTextOverflowTooltipDirective","","elementIsContainedInADiv","true",1,"dvl-section-report-item-text",3,"pTooltip"],[3,"src"],[1,"dvl-section-report-item-link",3,"click"]],template:function(i,o){i&1&&(QC(0,te,6,5,"a",0),ks(1,"div",1),QC(2,oe,4,2,"a",2),Uu(),QC(3,le,6,3,"a",3)),i&2&&(ZC(o.item?.menuType==="link"?0:-1),Iw(),Sy("pTooltip",J_(o.item.label))("showDelay",o.showDelay),Iw(),ZC(o.item?.menuType==="external"?2:-1),Iw(),ZC(o.item?.menuType==="command"?3:-1));},dependencies:[Wr,rt,W1,j1,g],styles:[`:host{height:100%}.dvl-section-report-item-link{transition:background-color .2s;text-decoration:none;text-align:center;border-radius:4px;width:100%;display:flex;flex-direction:column;height:100%;padding:10px 0}.dvl-section-report-item-link:hover{background-color:var(--bg-100)}.dvl-section-report-item-link:hover .dvl-section-report-item-text{color:var(--admin-section-item-label-hover-color)}.dvl-section-report-item-link:active{background-color:var(--bg-100)}.dvl-section-report-item-icon{padding-bottom:10px;display:flex;justify-content:center;align-items:center}.dvl-section-report-item-icon i{font-size:60px;color:var(--icon-color)}.dvl-section-report-item-text{transition:color .2s;color:var(--admin-section-item-label-color);line-height:16px;font-size:13px;font-weight:600;padding-left:5px;padding-right:5px;margin-top:auto;margin-bottom:auto;-webkit-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis}.dvl-tooltip.ui-tooltip{max-width:25em}
`],encapsulation:2,changeDetection:1});}}return t})();});var H,J=J$1(()=>{tS();ul();H=(()=>{class t{constructor(e){this.translator=e,this.toSectionViewModel=this.toSectionViewModel.bind(this),this.toItemViewModel=this.toItemViewModel.bind(this);}filter(e){return (e||[]).filter(i=>(i.items||[]).some(o=>o.condition?o.condition():!0)).map(this.toSectionViewModel)}getType(e){return e.link?"link":e.externalLink?"external":e.command?"command":"unknown"}toSectionViewModel(e){return {label:this.translator.translate(e.label),items:e.items.filter(i=>i.condition?i.condition():!0).map(this.toItemViewModel)}}toItemViewModel(e){return G$1(F({},e),{label:this.translator.translate(e.label),menuType:this.getType(e)})}static{this.\u0275fac=function(i){return new(i||t)(ye(Sr))};}static{this.\u0275prov=ce({token:t,factory:t.\u0275fac,providedIn:"root"});}}return t})();});function se(t,r){if(t&1&&(ks(0,"h1",2),W_(1),Uu()),t&2){let e=f_().$implicit;Iw(),iv(e.label);}}function me(t,r){if(t&1&&(ks(0,"div",4),Ny(1,"dvl-menu-dashboard-item",5),Uu()),t&2){let e=r.$implicit;Iw(),Sy("item",e);}}function pe(t,r){if(t&1&&(ks(0,"div",1),QC(1,se,2,1,"h1",2),ks(2,"div",3),JC(3,me,2,1,"div",4,KC),Uu()()),t&2){let e=r.$implicit;Iw(),ZC(e.label?1:-1),Iw(2),XC(e.items);}}var De,de=J$1(()=>{G();tS();J();De=(()=>{class t{constructor(e){this.menuFilterService=e,this.sections=[],this.filteredSections=[];}ngOnChanges(e){e.sections&&(this.filteredSections=this.menuFilterService.filter(this.sections));}static{this.\u0275fac=function(i){return new(i||t)(wo(H))};}static{this.\u0275cmp=QT({type:t,selectors:[["dvl-menu-dashboard"]],inputs:{sections:"sections"},features:[rD],decls:3,vars:0,consts:[[1,"content"],[1,"section"],[1,"section-title"],[1,"section-reports"],[1,"section-report-item"],[3,"item"]],template:function(i,o){i&1&&(ks(0,"div",0),JC(1,pe,5,1,"div",1,KC),Uu()),i&2&&(Iw(),XC(o.filteredSections));},dependencies:[U],styles:[".section[_ngcontent-%COMP%]{margin-bottom:1em}.section[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--admin-section-separator-color)}.section-title[_ngcontent-%COMP%]{color:var(--label-title-color);font-size:16px}.section-report-item[_ngcontent-%COMP%]{width:110px;margin-right:10px}.section-reports[_ngcontent-%COMP%]{padding:10px 0;display:flex;flex-wrap:wrap}"],changeDetection:1});}}return t})();});export{De as D,de as d};