import{a as R,b as Y}from"./chunk-ZVUXF5PM.js";import{a as q,c as W}from"./chunk-FRJ6A5YK.js";import{f as A,g as B,h as N}from"./chunk-ZBM6BFOI.js";import{E as z,I as Q}from"./chunk-HTXYTVN4.js";import{b as $,c as X}from"./chunk-YBNTOQCK.js";import{Dc as P,Ea as F,Fa as V,Hc as L,Jb as O,Jc as c,Qb as _,Wa as x,Xc as C,Yc as u,Zc as f,be as T,id as h,jd as g,mc as p,oc as d,pd as j,qc as y,rc as D,sc as M,ta as k,tb as E,tc as m,uc as l,vc as s,wc as v,xa as S,yb as r}from"./chunk-WL5U2YIT.js";import{a as w,b as I,e as b}from"./chunk-ADEKKGI2.js";function ee(e,i){if(e&1&&v(0,"svg-icon",5),e&2){let n=c(2);m("src",h(n.item.icon))("svgStyle",j(3,Z))}}function te(e,i){if(e&1&&v(0,"i"),e&2){let n=c(2);C(g("dvl-icon ",n.item.icon," dvl-icon-lg"))}}function ie(e,i){if(e&1&&(l(0,"a",0)(1,"div",4),p(2,ee,1,4,"svg-icon",5)(3,te,1,3,"i",6),s(),l(4,"span",7),u(5),s()()),e&2){let n,t=c();m("routerLink",t.item.link)("queryParams",t.item.queryParams),r(2),d((n=t.item.svgIcon)===!0?2:3),r(2),m("pTooltip",t.item.label),r(),f(t.item.label)}}function ne(e,i){if(e&1&&v(0,"svg-icon",8),e&2){let n=c(2);m("src",h(n.item.icon))}}function oe(e,i){if(e&1&&v(0,"i"),e&2){let n=c(2);C(g("dvl-icon ",n.item.icon," dvl-icon-lg"))}}function re(e,i){if(e&1&&(l(0,"a",2)(1,"div",4),p(2,ne,1,2,"svg-icon",8)(3,oe,1,3,"i",6),s()()),e&2){let n,t=c();m("href",t.item.externalLink,E),r(2),d((n=t.item.svgIcon)===!0?2:3)}}function ae(e,i){if(e&1&&v(0,"svg-icon",8),e&2){let n=c(2);m("src",h(n.item.icon))}}function le(e,i){if(e&1&&v(0,"i"),e&2){let n=c(2);C(g("dvl-icon ",n.item.icon," dvl-icon-lg"))}}function ce(e,i){if(e&1){let n=P();l(0,"a",9),L("click",function(){F(n);let o=c();return V(o.item.command())}),l(1,"div",4),p(2,ae,1,2,"svg-icon",8)(3,le,1,3,"i",6),s(),l(4,"span",7),u(5),s()()}if(e&2){let n,t=c();r(2),d((n=t.item.svgIcon)===!0?2:3),r(2),m("pTooltip",t.item.label),r(),f(t.item.label)}}var Z,G,H=b(()=>{Q();W();N();Y();T();N();Z=()=>({"width.px":60,"height.%":100});G=(()=>{let i=class i{ngOnChanges(t){if(t.item&&this.item){let o=Math.max(...(this.item.label||"").split(" ").map(a=>a.length));this.showDelay=o>10?0:1e3}}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=_({type:i,selectors:[["dvl-menu-dashboard-item"]],inputs:{item:"item"},features:[x],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"],[1,"dvl-icon-lg",3,"svgStyle","src"],[3,"class"],["dvlsTextOverflowTooltipDirective","","elementIsContainedInADiv","true",1,"dvl-section-report-item-text",3,"pTooltip"],[3,"src"],[1,"dvl-section-report-item-link",3,"click"]],template:function(o,a){o&1&&(p(0,ie,6,5,"a",0),l(1,"div",1),p(2,re,4,2,"a",2),s(),p(3,ce,6,3,"a",3)),o&2&&(d((a.item==null?null:a.item.menuType)==="link"?0:-1),r(),m("pTooltip",h(a.item.label))("showDelay",a.showDelay),r(),d((a.item==null?null:a.item.menuType)==="external"?2:-1),r(),d((a.item==null?null:a.item.menuType)==="command"?3:-1))},dependencies:[z,q,B,A,R],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});let e=i;return e})()});var J,K=b(()=>{T();X();J=(()=>{let i=class i{constructor(t){this.translator=t,this.toSectionViewModel=this.toSectionViewModel.bind(this),this.toItemViewModel=this.toItemViewModel.bind(this)}filter(t){return(t||[]).filter(o=>(o.items||[]).some(a=>a.condition?a.condition():!0)).map(this.toSectionViewModel)}getType(t){return t.link?"link":t.externalLink?"external":t.command?"command":"unknown"}toSectionViewModel(t){return{label:this.translator.translate(t.label),items:t.items.filter(o=>o.condition?o.condition():!0).map(this.toItemViewModel)}}toItemViewModel(t){return I(w({},t),{label:this.translator.translate(t.label),menuType:this.getType(t)})}};i.\u0275fac=function(o){return new(o||i)(S($))},i.\u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})()});function me(e,i){if(e&1&&(l(0,"h1",2),u(1),s()),e&2){let n=c().$implicit;r(),f(n.label)}}function pe(e,i){if(e&1&&(l(0,"div",4),v(1,"dvl-menu-dashboard-item",5),s()),e&2){let n=i.$implicit;r(),m("item",n)}}function de(e,i){if(e&1&&(l(0,"div",1),p(1,me,2,1,"h1",2),l(2,"div",3),D(3,pe,2,1,"div",4,y),s()()),e&2){let n=i.$implicit;r(),d(n.label?1:-1),r(2),M(n.items)}}var De,ve=b(()=>{H();T();K();De=(()=>{let i=class i{constructor(t){this.menuFilterService=t,this.sections=[],this.filteredSections=[]}ngOnChanges(t){t.sections&&(this.filteredSections=this.menuFilterService.filter(this.sections))}};i.\u0275fac=function(o){return new(o||i)(O(J))},i.\u0275cmp=_({type:i,selectors:[["dvl-menu-dashboard"]],inputs:{sections:"sections"},features:[x],decls:3,vars:0,consts:[[1,"content"],[1,"section"],[1,"section-title"],[1,"section-reports"],[1,"section-report-item"],[3,"item"]],template:function(o,a){o&1&&(l(0,"div",0),D(1,de,5,1,"div",1,y),s()),o&2&&(r(),M(a.filteredSections))},dependencies:[G],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}"]});let e=i;return e})()});export{De as a,ve as b};
