import{a as B,b as W}from"./chunk-74XJ57PC.js";import{a as j,c as K}from"./chunk-6E4HH5ZO.js";import{a as q,b as $,c as A}from"./chunk-J75YHVMQ.js";import{k as L,o as J}from"./chunk-HO2J6YLX.js";import{b as z,c as Q}from"./chunk-IOINCEV4.js";import{Ac as l,Dc as v,Eb as V,Gd as y,Ia as h,Ja as k,Ka as S,Ob as _,Rc as u,Sc as f,Tb as s,cd as P,ec as m,jc as x,lc as p,nc as C,oc as b,pc as D,qc as r,rc as c,sa as T,sc as d,ub as F,wc as E,xa as w,zb as o,zc as O}from"./chunk-JSJB5BKT.js";import{a as I,b as M,e as g}from"./chunk-SZAW6ZBW.js";function Y(t,a){if(t&1&&d(0,"svg-icon",5),t&2){let e=l(2);v("src",e.item.icon),m("svgStyle",P(2,X))}}function Z(t,a){if(t&1&&d(0,"i"),t&2){let e=l(2);x("dvl-icon ",e.item.icon," dvl-icon-lg")}}function ee(t,a){if(t&1&&(r(0,"a",0)(1,"div",4),s(2,Y,1,3,"svg-icon",5)(3,Z,1,3,"i",6),c(),r(4,"span",7),u(5),c()()),t&2){let e,i=l();m("routerLink",i.item.link)("queryParams",i.item.queryParams),o(2),p((e=i.item.svgIcon)===!0?2:3),o(2),m("pTooltip",i.item.label),o(),f(i.item.label)}}function te(t,a){if(t&1&&d(0,"svg-icon",8),t&2){let e=l(2);v("src",e.item.icon)}}function ie(t,a){if(t&1&&d(0,"i"),t&2){let e=l(2);x("dvl-icon ",e.item.icon," dvl-icon-lg")}}function ne(t,a){if(t&1&&(r(0,"a",2)(1,"div",4),s(2,te,1,1,"svg-icon",8)(3,ie,1,3,"i",6),c()()),t&2){let e,i=l();m("href",i.item.externalLink,F),o(2),p((e=i.item.svgIcon)===!0?2:3)}}function oe(t,a){if(t&1&&d(0,"svg-icon",8),t&2){let e=l(2);v("src",e.item.icon)}}function re(t,a){if(t&1&&d(0,"i"),t&2){let e=l(2);x("dvl-icon ",e.item.icon," dvl-icon-lg")}}function ae(t,a){if(t&1){let e=E();r(0,"a",9),O("click",function(){k(e);let n=l();return S(n.item.command())}),r(1,"div",4),s(2,oe,1,1,"svg-icon",8)(3,re,1,3,"i",6),c(),r(4,"span",7),u(5),c()()}if(t&2){let e,i=l();o(2),p((e=i.item.svgIcon)===!0?2:3),o(2),m("pTooltip",i.item.label),o(),f(i.item.label)}}var X,R,U=g(()=>{J();K();A();W();y();A();X=()=>({"width.px":60,"height.%":100});R=(()=>{class t{ngOnChanges(e){if(e.item&&this.item){let i=Math.max(...(this.item.label||"").split(" ").map(n=>n.length));this.showDelay=i>10?0:1e3}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["dvl-menu-dashboard-item"]],inputs:{item:"item"},features:[h],decls:4,vars:5,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(i,n){i&1&&(s(0,ee,6,5,"a",0),r(1,"div",1),s(2,ne,4,2,"a",2),c(),s(3,ae,6,3,"a",3)),i&2&&(p((n.item==null?null:n.item.menuType)==="link"?0:-1),o(),v("pTooltip",n.item.label),m("showDelay",n.showDelay),o(),p((n.item==null?null:n.item.menuType)==="external"?2:-1),o(),p((n.item==null?null:n.item.menuType)==="command"?3:-1))},dependencies:[L,j,$,q,B],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(--admin-section-bg-hover-color)}.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(--admin-section-bg-active-color)}.dvl-section-report-item-icon{padding-bottom:10px}.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;hyphens:auto;overflow:hidden;text-overflow:ellipsis}.dvl-tooltip.ui-tooltip{max-width:25em}
`],encapsulation:2})}}return t})()});var G,H=g(()=>{y();Q();G=(()=>{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(n=>n.condition?n.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 M(I({},e),{label:this.translator.translate(e.label),menuType:this.getType(e)})}static{this.\u0275fac=function(i){return new(i||t)(w(z))}}static{this.\u0275prov=T({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})()});function ce(t,a){if(t&1&&(r(0,"h1",2),u(1),c()),t&2){let e=l().$implicit;o(),f(e.label)}}function se(t,a){if(t&1&&(r(0,"div",4),d(1,"dvl-menu-dashboard-item",5),c()),t&2){let e=a.$implicit;o(),m("item",e)}}function me(t,a){if(t&1&&(r(0,"div",1),s(1,ce,2,1,"h1",2),r(2,"div",3),b(3,se,2,1,"div",4,C),c()()),t&2){let e=a.$implicit;o(),p(e.label?1:-1),o(2),D(e.items)}}var be,pe=g(()=>{U();y();H();be=(()=>{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)(V(G))}}static{this.\u0275cmp=_({type:t,selectors:[["dvl-menu-dashboard"]],inputs:{sections:"sections"},features:[h],decls:3,vars:0,consts:[[1,"content"],[1,"section"],[1,"section-title"],[1,"section-reports"],[1,"section-report-item"],[3,"item"]],template:function(i,n){i&1&&(r(0,"div",0),b(1,me,5,1,"div",1,C),c()),i&2&&(o(),D(n.filteredSections))},dependencies:[R],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}"]})}}return t})()});export{be as a,pe as b};
