text: "use strict";var e=require("vue"),t=require("primevue/utils"),n={name:"PanelMenuSub",emits:["item-toggle"],props:{model:{type:null,default:null},template:{type:Object,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.$emit("item-toggle",{item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},getItemClass:e=>["p-menuitem",e.className],linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getSubmenuIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi pi-fw",{"pi-angle-right":!t,"pi-angle-down":t}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled}};const l={class:"p-submenu-list",role:"tree"},a={class:"p-menuitem-text"},i={class:"p-menuitem-text"},o={class:"p-toggleable-content"};n.render=function(t,n,s,c,r,d){const m=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub",!0);return e.openBlock(),e.createBlock("ul",l,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.model,((l,c)=>(e.openBlock(),e.createBlock(e.Fragment,{key:l.label+c.toString()},[d.visible(l)&&!l.separator?(e.openBlock(),e.createBlock("li",{key:0,role:"none",class:d.getItemClass(l),style:l.style},[s.template?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.template),{key:1,item:l},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[l.to&&!d.disabled(l)?(e.openBlock(),e.createBlock(m,{key:0,to:l.to,custom:""},{default:e.withCtx((({navigate:t,href:n,isActive:i,isExactActive:o})=>[e.createVNode("a",{href:n,class:d.linkClass(l,{isActive:i,isExactActive:o}),onClick:e=>d.onItemClick(e,l,t),role:"treeitem","aria-expanded":i(l)},[e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",a,e.toDisplayString(l.label),1)],10,["href","onClick","aria-expanded"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:l.url,class:d.linkClass(l),target:l.target,onClick:e=>d.onItemClick(e,l),role:"treeitem","aria-expanded":d.isActive(l),tabindex:d.disabled(l)?null:"0"},[l.items?(e.openBlock(),e.createBlock("span",{key:0,class:d.getSubmenuIcon(l)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",{class:["p-menuitem-icon",l.icon]},null,2),e.createVNode("span",i,e.toDisplayString(l.label),1)],10,["href","target","onClick","aria-expanded","tabindex"]))],64)),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",o,[d.visible(l)&&l.items?(e.openBlock(),e.createBlock(p,{model:l.items,key:l.label+"_sub_",template:s.template,expandedKeys:s.expandedKeys,onItemToggle:n[1]||(n[1]=e=>t.$emit("item-toggle",e)),exact:s.exact},null,8,["model","template","expandedKeys","exact"])):e.createCommentVNode("",!0)],512),[[e.vShow,d.isActive(l)]])])),_:2},1024)],6)):e.createCommentVNode("",!0),d.visible(l)&&l.separator?(e.openBlock(),e.createBlock("li",{class:["p-menu-separator",l.class],style:l.style,key:"separator"+c.toString()},null,6)):e.createCommentVNode("",!0)],64)))),128))])};var s={name:"PanelMenu",emits:["update:expandedKeys"],props:{model:{type:Array,default:null},expandedKeys:{type:null,default:null},exact:{type:Boolean,default:!0}},data:()=>({activeItem:null}),methods:{onItemClick(e,t,n){this.isActive(t)&&null===this.activeItem&&(this.activeItem=t),this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.activeItem&&this.activeItem===t?this.activeItem=null:this.activeItem=t,this.updateExpandedKeys({item:t,expanded:null!=this.activeItem}),t.to&&n&&n(e))},updateExpandedKeys(e){if(this.expandedKeys){let t=e.item,n={...this.expandedKeys};e.expanded?n[t.key]=!0:delete n[t.key],this.$emit("update:expandedKeys",n)}},getPanelClass:e=>["p-panelmenu-panel",e.class],getPanelToggleIcon(e){const t=this.isActive(e);return["p-panelmenu-icon pi",{"pi-chevron-right":!t," pi-chevron-down":t}]},getPanelIcon:e=>["p-menuitem-icon",e.icon],getHeaderLinkClass(e,t){return["p-panelmenu-header-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},isActive(e){return this.expandedKeys?this.expandedKeys[e.key]:e===this.activeItem},getHeaderClass(e){return["p-component p-panelmenu-header",{"p-highlight":this.isActive(e),"p-disabled":this.disabled(e)}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},components:{PanelMenuSub:n},computed:{ariaId:()=>t.UniqueComponentId()}};const c={class:"p-panelmenu p-component"},r={class:"p-menuitem-text"},d={class:"p-menuitem-text"},m={key:0,class:"p-panelmenu-content"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("\n.p-panelmenu .p-panelmenu-header-link {\n    display: -webkit-box;\n    display: -ms-flexbox;\n    display: flex;\n    -webkit-box-align: center;\n        -ms-flex-align: center;\n            align-items: center;\n    -webkit-user-select: none;\n       -moz-user-select: none;\n        -ms-user-select: none;\n            user-select: none;\n    cursor: pointer;\n    position: relative;\n    text-decoration: none;\n}\n.p-panelmenu .p-panelmenu-header-link:focus {\n    z-index: 1;\n}\n.p-panelmenu .p-submenu-list {\n    margin: 0;\n    padding: 0;\n    list-style: none;\n}\n.p-panelmenu .p-menuitem-link {\n    display: -webkit-box;\n    display: -ms-flexbox;\n    display: flex;\n    -webkit-box-align: center;\n        -ms-flex-align: center;\n            align-items: center;\n    -webkit-user-select: none;\n       -moz-user-select: none;\n        -ms-user-select: none;\n            user-select: none;\n    cursor: pointer;\n    text-decoration: none;\n}\n.p-panelmenu .p-menuitem-text {\n    line-height: 1;\n}\n"),s.render=function(t,n,l,a,i,o){const s=e.resolveComponent("router-link"),p=e.resolveComponent("PanelMenuSub");return e.openBlock(),e.createBlock("div",c,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(l.model,((n,a)=>(e.openBlock(),e.createBlock(e.Fragment,{key:n.label+"_"+a},[o.visible(n)?(e.openBlock(),e.createBlock("div",{key:0,class:o.getPanelClass(n),style:n.style},[e.createVNode("div",{class:o.getHeaderClass(n),style:n.style},[t.$slots.item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.$slots.item),{key:1,item:n},null,8,["item"])):(e.openBlock(),e.createBlock(e.Fragment,{key:0},[n.to&&!o.disabled(n)?(e.openBlock(),e.createBlock(s,{key:0,to:n.to,custom:""},{default:e.withCtx((({navigate:t,href:l,isActive:a,isExactActive:i})=>[e.createVNode("a",{href:l,class:o.getHeaderLinkClass(n,{isActive:a,isExactActive:i}),onClick:e=>o.onItemClick(e,n,t),role:"treeitem"},[n.icon?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",r,e.toDisplayString(n.label),1)],10,["href","onClick"])])),_:2},1032,["to"])):(e.openBlock(),e.createBlock("a",{key:1,href:n.url,class:o.getHeaderLinkClass(n),onClick:e=>o.onItemClick(e,n),tabindex:o.disabled(n)?null:"0","aria-expanded":o.isActive(n),id:o.ariaId+"_header","aria-controls":o.ariaId+"_content"},[n.items?(e.openBlock(),e.createBlock("span",{key:0,class:o.getPanelToggleIcon(n)},null,2)):e.createCommentVNode("",!0),n.icon?(e.openBlock(),e.createBlock("span",{key:1,class:o.getPanelIcon(n)},null,2)):e.createCommentVNode("",!0),e.createVNode("span",d,e.toDisplayString(n.label),1)],10,["href","onClick","tabindex","aria-expanded","id","aria-controls"]))],64))],6),e.createVNode(e.Transition,{name:"p-toggleable-content"},{default:e.withCtx((()=>[e.withDirectives(e.createVNode("div",{class:"p-toggleable-content",role:"region",id:o.ariaId+"_content","aria-labelledby":o.ariaId+"_header"},[n.items?(e.openBlock(),e.createBlock("div",m,[e.createVNode(p,{model:n.items,class:"p-panelmenu-root-submenu",template:t.$slots.item,expandedKeys:l.expandedKeys,onItemToggle:o.updateExpandedKeys,exact:l.exact},null,8,["model","template","expandedKeys","onItemToggle","exact"])])):e.createCommentVNode("",!0)],8,["id","aria-labelledby"]),[[e.vShow,o.isActive(n)]])])),_:2},1024)],6)):e.createCommentVNode("",!0)],64)))),128))])},module.exports=s;
  