primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [ • 20.3 kB
JavaScript
import e from"primevue/icons/chevrondown";import t from"primevue/icons/chevronright";import{ObjectUtils as s,DomHandler as i,UniqueComponentId as n}from"primevue/utils";import a from"primevue/ripple";import{resolveComponent as o,resolveDirective as l,openBlock as r,createElementBlock as m,Fragment as c,renderList as d,normalizeStyle as u,normalizeClass as h,createElementVNode as p,createBlock as I,withCtx as g,withDirectives as f,resolveDynamicComponent as y,createCommentVNode as v,toDisplayString as b,createVNode as P,Transition as k,vShow as x,renderSlot as C}from"vue";var K={name:"PanelMenuSub",emits:["item-toggle"],props:{panelId:{type:String,default:null},focusedItemId:{type:String,default:null},items:{type:Array,default:null},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},exact:{type:Boolean,default:!0}},methods:{getItemId(e){return`${this.panelId}_${e.key}`},getItemKey(e){return this.getItemId(e)},getItemProp:(e,t,i)=>e&&e.item?s.getItemValue(e.item[t],i):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemActive(e){return this.activeItemPath.some((t=>t.key===e.key))},isItemVisible(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled(e){return this.getItemProp(e,"disabled")},isItemFocused(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:e=>s.isNotEmpty(e.items),onItemClick(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.$emit("item-toggle",{processedItem:t,expanded:!this.isItemActive(t)})},onItemToggle(e){this.$emit("item-toggle",e)},onItemActionClick(e,t){t&&t(e)},getAriaSetSize(){return this.items.filter((e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator"))).length},getAriaPosInset(e){return e-this.items.slice(0,e).filter((e=>this.isItemVisible(e)&&this.getItemProp(e,"separator"))).length+1},getItemClass(e){return["p-menuitem",this.getItemProp(e,"class"),{"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)}]},getItemActionClass(e,t){return["p-menuitem-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},getItemIconClass(e){return["p-menuitem-icon",this.getItemProp(e,"icon")]},getSeparatorItemClass(e){return["p-menuitem-separator",this.getItemProp(e,"class")]}},components:{ChevronRightIcon:t,ChevronDownIcon:e},directives:{ripple:a}};const A={class:"p-submenu-list"},E=["id","aria-label","aria-expanded","aria-level","aria-setsize","aria-posinset"],H=["onClick"],w=["href","onClick"],D={class:"p-menuitem-text"},S=["href","target"],F={class:"p-menuitem-text"},L={class:"p-toggleable-content"};K.render=function(e,t,s,i,n,a){const C=o("router-link"),K=o("PanelMenuSub",!0),V=l("ripple");return r(),m("ul",A,[(r(!0),m(c,null,d(s.items,((e,t)=>(r(),m(c,{key:a.getItemKey(e)},[a.isItemVisible(e)&&!a.getItemProp(e,"separator")?(r(),m("li",{key:0,id:a.getItemId(e),style:u(a.getItemProp(e,"style")),class:h(a.getItemClass(e)),role:"treeitem","aria-label":a.getItemLabel(e),"aria-expanded":a.isItemGroup(e)?a.isItemActive(e):void 0,"aria-level":s.level+1,"aria-setsize":a.getAriaSetSize(),"aria-posinset":a.getAriaPosInset(t)},[p("div",{class:"p-menuitem-content",onClick:t=>a.onItemClick(t,e)},[s.templates.item?(r(),I(y(s.templates.item),{key:1,item:e.item},null,8,["item"])):(r(),m(c,{key:0},[a.getItemProp(e,"to")&&!a.isItemDisabled(e)?(r(),I(C,{key:0,to:a.getItemProp(e,"to"),custom:""},{default:g((({navigate:t,href:i,isActive:n,isExactActive:o})=>[f((r(),m("a",{href:i,class:h(a.getItemActionClass(e,{isActive:n,isExactActive:o})),tabindex:"-1","aria-hidden":"true",onClick:e=>a.onItemActionClick(e,t)},[s.templates.itemicon?(r(),I(y(s.templates.itemicon),{key:0,item:e.item,class:h(a.getItemIconClass(e))},null,8,["item","class"])):a.getItemProp(e,"icon")?(r(),m("span",{key:1,class:h(a.getItemIconClass(e))},null,2)):v("",!0),p("span",D,b(a.getItemLabel(e)),1)],10,w)),[[V]])])),_:2},1032,["to"])):f((r(),m("a",{key:1,href:a.getItemProp(e,"url"),class:h(a.getItemActionClass(e)),target:a.getItemProp(e,"target"),tabindex:"-1","aria-hidden":"true"},[a.isItemGroup(e)?(r(),m(c,{key:0},[s.templates.submenuicon?(r(),I(y(s.templates.submenuicon),{key:0,class:"p-submenu-icon",active:a.isItemActive(e)},null,8,["active"])):(r(),I(y(a.isItemActive(e)?"ChevronDownIcon":"ChevronRightIcon"),{key:1,class:"p-submenu-icon"}))],64)):v("",!0),s.templates.itemicon?(r(),I(y(s.templates.itemicon),{key:1,item:e.item,class:h(a.getItemIconClass(e))},null,8,["item","class"])):a.getItemProp(e,"icon")?(r(),m("span",{key:2,class:h(a.getItemIconClass(e))},null,2)):v("",!0),p("span",F,b(a.getItemLabel(e)),1)],10,S)),[[V]])],64))],8,H),P(k,{name:"p-toggleable-content"},{default:g((()=>[f(p("div",L,[a.isItemVisible(e)&&a.isItemGroup(e)?(r(),I(K,{key:0,id:a.getItemId(e)+"_list",role:"group",panelId:s.panelId,focusedItemId:s.focusedItemId,items:e.items,level:s.level+1,templates:s.templates,activeItemPath:s.activeItemPath,exact:s.exact,onItemToggle:a.onItemToggle},null,8,["id","panelId","focusedItemId","items","level","templates","activeItemPath","exact","onItemToggle"])):v("",!0)],512),[[x,a.isItemActive(e)]])])),_:2},1024)],14,E)):v("",!0),a.isItemVisible(e)&&a.getItemProp(e,"separator")?(r(),m("li",{key:1,style:u(a.getItemProp(e,"style")),class:h(a.getSeparatorItemClass(e)),role:"separator"},null,6)):v("",!0)],64)))),128))])};var V={name:"PanelMenuList",emits:["item-toggle","header-focus"],props:{panelId:{type:String,default:null},items:{type:Array,default:null},templates:{type:Object,default:null},expandedKeys:{type:Object,default:null},exact:{type:Boolean,default:!0}},searchTimeout:null,searchValue:null,data:()=>({focused:!1,focusedItem:null,activeItemPath:[]}),watch:{expandedKeys(e){this.autoUpdateActiveItemPath(e)}},mounted(){this.autoUpdateActiveItemPath(this.expandedKeys)},methods:{getItemProp:(e,t)=>e&&e.item?s.getItemValue(e.item[t]):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemVisible(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled(e){return this.getItemProp(e,"disabled")},isItemActive(e){return this.activeItemPath.some((t=>t.key===e.parentKey))},isItemGroup:e=>s.isNotEmpty(e.items),onFocus(e){this.focused=!0,this.focusedItem=this.focusedItem||(this.isElementInPanel(e,e.relatedTarget)?this.findFirstItem():this.findLastItem())},onBlur(){this.focused=!1,this.focusedItem=null,this.searchValue=""},onKeyDown(e){const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":case"Tab":case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&s.isPrintableCharacter(e.key)&&this.searchItems(e,e.key)}},onArrowDownKey(e){const t=s.isNotEmpty(this.focusedItem)?this.findNextItem(this.focusedItem):this.findFirstItem();this.changeFocusedItem({originalEvent:e,processedItem:t,focusOnNext:!0}),e.preventDefault()},onArrowUpKey(e){const t=s.isNotEmpty(this.focusedItem)?this.findPrevItem(this.focusedItem):this.findLastItem();this.changeFocusedItem({originalEvent:e,processedItem:t,selfCheck:!0}),e.preventDefault()},onArrowLeftKey(e){if(s.isNotEmpty(this.focusedItem)){this.activeItemPath.some((e=>e.key===this.focusedItem.key))?this.activeItemPath=this.activeItemPath.filter((e=>e.key!==this.focusedItem.key)):this.focusedItem=s.isNotEmpty(this.focusedItem.parent)?this.focusedItem.parent:this.focusedItem,e.preventDefault()}},onArrowRightKey(e){if(s.isNotEmpty(this.focusedItem)){if(this.isItemGroup(this.focusedItem)){this.activeItemPath.some((e=>e.key===this.focusedItem.key))?this.onArrowDownKey(e):(this.activeItemPath=this.activeItemPath.filter((e=>e.parentKey!==this.focusedItem.parentKey)),this.activeItemPath.push(this.focusedItem))}e.preventDefault()}},onHomeKey(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findFirstItem(),allowHeaderFocus:!1}),e.preventDefault()},onEndKey(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findLastItem(),focusOnNext:!0,allowHeaderFocus:!1}),e.preventDefault()},onEnterKey(e){if(s.isNotEmpty(this.focusedItem)){const e=i.findSingle(this.$el,`li[id="${this.focusedItemId}"]`),t=e&&(i.findSingle(e,".p-menuitem-link")||i.findSingle(e,"a,button"));t?t.click():e&&e.click()}e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},onItemToggle(e){const{processedItem:t,expanded:s}=e;this.expandedKeys?this.$emit("item-toggle",{item:t.item,expanded:s}):(this.activeItemPath=this.activeItemPath.filter((e=>e.parentKey!==t.parentKey)),s&&this.activeItemPath.push(t)),this.focusedItem=t,i.focus(this.$el)},isElementInPanel(e,t){const s=e.currentTarget.closest(".p-panelmenu-panel");return s&&s.contains(t)},isItemMatched(e){return this.isValidItem(e)&&this.getItemLabel(e).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))},isVisibleItem(e){return!!e&&(0===e.level||this.isItemActive(e))&&this.isItemVisible(e)},isValidItem(e){return!!e&&!this.isItemDisabled(e)},findFirstItem(){return this.visibleItems.find((e=>this.isValidItem(e)))},findLastItem(){return s.findLast(this.visibleItems,(e=>this.isValidItem(e)))},findNextItem(e){const t=this.visibleItems.findIndex((t=>t.key===e.key));return(t<this.visibleItems.length-1?this.visibleItems.slice(t+1).find((e=>this.isValidItem(e))):void 0)||e},findPrevItem(e){const t=this.visibleItems.findIndex((t=>t.key===e.key));return(t>0?s.findLast(this.visibleItems.slice(0,t),(e=>this.isValidItem(e))):void 0)||e},searchItems(e,t){this.searchValue=(this.searchValue||"")+t;let i=null,n=!1;if(s.isNotEmpty(this.focusedItem)){const e=this.visibleItems.findIndex((e=>e.key===this.focusedItem.key));i=this.visibleItems.slice(e).find((e=>this.isItemMatched(e))),i=s.isEmpty(i)?this.visibleItems.slice(0,e).find((e=>this.isItemMatched(e))):i}else i=this.visibleItems.find((e=>this.isItemMatched(e)));return s.isNotEmpty(i)&&(n=!0),s.isEmpty(i)&&s.isEmpty(this.focusedItem)&&(i=this.findFirstItem()),s.isNotEmpty(i)&&this.changeFocusedItem({originalEvent:e,processedItem:i,allowHeaderFocus:!1}),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),n},changeFocusedItem(e){const{originalEvent:t,processedItem:i,focusOnNext:n,selfCheck:a,allowHeaderFocus:o=!0}=e;s.isNotEmpty(this.focusedItem)&&this.focusedItem.key!==i.key?(this.focusedItem=i,this.scrollInView()):o&&this.$emit("header-focus",{originalEvent:t,focusOnNext:n,selfCheck:a})},scrollInView(){const e=i.findSingle(this.$el,`li[id="${this.focusedItemId}"]`);e&&e.scrollIntoView&&e.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateActiveItemPath(e){this.activeItemPath=Object.entries(e||{}).reduce(((e,[t,s])=>{if(s){const s=this.findProcessedItemByItemKey(t);s&&e.push(s)}return e}),[])},findProcessedItemByItemKey(e,t,s=0){if(!(t=t||0===s&&this.processedItems))return null;for(let i=0;i<t.length;i++){const n=t[i];if(this.getItemProp(n,"key")===e)return n;const a=this.findProcessedItemByItemKey(e,n.items,s+1);if(a)return a}},createProcessedItems(e,t=0,s={},i=""){const n=[];return e&&e.forEach(((e,a)=>{const o=(""!==i?i+"_":"")+a,l={item:e,index:a,level:t,key:o,parent:s,parentKey:i};l.items=this.createProcessedItems(e.items,t+1,l,o),n.push(l)})),n},flatItems(e,t=[]){return e&&e.forEach((e=>{this.isVisibleItem(e)&&(t.push(e),this.flatItems(e.items,t))})),t}},computed:{processedItems(){return this.createProcessedItems(this.items||[])},visibleItems(){return this.flatItems(this.processedItems)},focusedItemId(){return s.isNotEmpty(this.focusedItem)?`${this.panelId}_${this.focusedItem.key}`:null}},components:{PanelMenuSub:K}};V.render=function(e,t,s,i,n,a){const l=o("PanelMenuSub");return r(),I(l,{id:s.panelId+"_list",class:"p-panelmenu-root-list",role:"tree",tabindex:-1,"aria-activedescendant":n.focused?a.focusedItemId:void 0,panelId:s.panelId,focusedItemId:n.focused?a.focusedItemId:void 0,items:a.processedItems,templates:s.templates,activeItemPath:n.activeItemPath,exact:s.exact,onFocus:a.onFocus,onBlur:a.onBlur,onKeydown:a.onKeyDown,onItemToggle:a.onItemToggle},null,8,["id","aria-activedescendant","panelId","focusedItemId","items","templates","activeItemPath","exact","onFocus","onBlur","onKeydown","onItemToggle"])};var $={name:"PanelMenu",emits:["update:expandedKeys","panel-open","panel-close"],props:{model:{type:Array,default:null},expandedKeys:{type:Object,default:null},exact:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},data(){return{id:this.$attrs.id,activeItem:null}},watch:{"$attrs.id":function(e){this.id=e||n()}},mounted(){this.id=this.id||n()},methods:{getItemProp:(e,t)=>e?s.getItemValue(e[t]):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemActive(e){return this.expandedKeys?this.expandedKeys[this.getItemProp(e,"key")]:s.equals(e,this.activeItem)},isItemVisible(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled(e){return this.getItemProp(e,"disabled")},getPanelId(e){return`${this.id}_${e}`},getPanelKey(e){return this.getPanelId(e)},getHeaderId(e){return`${this.getPanelId(e)}_header`},getContentId(e){return`${this.getPanelId(e)}_content`},onHeaderClick(e,t){this.isItemDisabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),this.changeActiveItem(e,t),i.focus(e.currentTarget))},onHeaderKeyDown(e,t){switch(e.code){case"ArrowDown":this.onHeaderArrowDownKey(e);break;case"ArrowUp":this.onHeaderArrowUpKey(e);break;case"Home":this.onHeaderHomeKey(e);break;case"End":this.onHeaderEndKey(e);break;case"Enter":case"Space":this.onHeaderEnterKey(e,t)}},onHeaderArrowDownKey(e){const t=i.hasClass(e.currentTarget,"p-highlight")?i.findSingle(e.currentTarget.nextElementSibling,".p-panelmenu-root-list"):null;t?i.focus(t):this.updateFocusedHeader({originalEvent:e,focusOnNext:!0}),e.preventDefault()},onHeaderArrowUpKey(e){const t=this.findPrevHeader(e.currentTarget.parentElement)||this.findLastHeader(),s=i.hasClass(t,"p-highlight")?i.findSingle(t.nextElementSibling,".p-panelmenu-root-list"):null;s?i.focus(s):this.updateFocusedHeader({originalEvent:e,focusOnNext:!1}),e.preventDefault()},onHeaderHomeKey(e){this.changeFocusedHeader(e,this.findFirstHeader()),e.preventDefault()},onHeaderEndKey(e){this.changeFocusedHeader(e,this.findLastHeader()),e.preventDefault()},onHeaderEnterKey(e,t){const s=i.findSingle(e.currentTarget,".p-panelmenu-header-action");s?s.click():this.onHeaderClick(e,t),e.preventDefault()},onHeaderActionClick(e,t){t&&t(e)},findNextHeader(e,t=!1){const s=t?e:e.nextElementSibling,n=i.findSingle(s,".p-panelmenu-header");return n?i.hasClass(n,"p-disabled")?this.findNextHeader(n.parentElement):n:null},findPrevHeader(e,t=!1){const s=t?e:e.previousElementSibling,n=i.findSingle(s,".p-panelmenu-header");return n?i.hasClass(n,"p-disabled")?this.findPrevHeader(n.parentElement):n:null},findFirstHeader(){return this.findNextHeader(this.$el.firstElementChild,!0)},findLastHeader(){return this.findPrevHeader(this.$el.lastElementChild,!0)},updateFocusedHeader(e){const{originalEvent:t,focusOnNext:s,selfCheck:n}=e,a=t.currentTarget.closest(".p-panelmenu-panel"),o=n?i.findSingle(a,".p-panelmenu-header"):s?this.findNextHeader(a):this.findPrevHeader(a);o?this.changeFocusedHeader(t,o):s?this.onHeaderHomeKey(t):this.onHeaderEndKey(t)},changeActiveItem(e,t,i=!1){if(!this.isItemDisabled(t)){const n=this.isItemActive(t),a=n?"panel-close":"panel-open";this.activeItem=i?t:this.activeItem&&s.equals(t,this.activeItem)?null:t,this.changeExpandedKeys({item:t,expanded:!n}),this.$emit(a,{originalEvent:e,item:t})}},changeExpandedKeys({item:e,expanded:t=!1}){if(this.expandedKeys){let s={...this.expandedKeys};t?s[e.key]=!0:delete s[e.key],this.$emit("update:expandedKeys",s)}},changeFocusedHeader(e,t){t&&i.focus(t)},getPanelClass(e){return["p-panelmenu-panel",this.getItemProp(e,"class")]},getHeaderClass(e){return["p-panelmenu-header",this.getItemProp(e,"headerClass"),{"p-highlight":this.isItemActive(e),"p-disabled":this.isItemDisabled(e)}]},getHeaderActionClass(e,t){return["p-panelmenu-header-action",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},getHeaderIconClass(e){return["p-menuitem-icon",this.getItemProp(e,"icon")]}},components:{PanelMenuList:V,ChevronRightIcon:t,ChevronDownIcon:e}};const N=["id"],T=["id","tabindex","aria-label","aria-expanded","aria-controls","aria-disabled","onClick","onKeydown"],B={class:"p-panelmenu-header-content"},O=["href","onClick"],M={class:"p-menuitem-text"},_=["href"],U={class:"p-menuitem-text"},R=["id","aria-labelledby"],j={key:0,class:"p-panelmenu-content"};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===s&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-panelmenu .p-panelmenu-header-action {\n display: flex;\n align-items: center;\n user-select: none;\n cursor: pointer;\n position: relative;\n text-decoration: none;\n}\n.p-panelmenu .p-panelmenu-header-action: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: flex;\n align-items: center;\n user-select: none;\n cursor: pointer;\n text-decoration: none;\n position: relative;\n overflow: hidden;\n}\n.p-panelmenu .p-menuitem-text {\n line-height: 1;\n}\n"),$.render=function(e,t,s,i,n,a){const l=o("router-link"),K=o("PanelMenuList");return r(),m("div",{id:n.id,class:"p-panelmenu p-component"},[(r(!0),m(c,null,d(s.model,((t,i)=>(r(),m(c,{key:a.getPanelKey(i)},[a.isItemVisible(t)?(r(),m("div",{key:0,style:u(a.getItemProp(t,"style")),class:h(a.getPanelClass(t))},[p("div",{id:a.getHeaderId(i),class:h(a.getHeaderClass(t)),tabindex:a.isItemDisabled(t)?-1:s.tabindex,role:"button","aria-label":a.getItemLabel(t),"aria-expanded":a.isItemActive(t),"aria-controls":a.getContentId(i),"aria-disabled":a.isItemDisabled(t),onClick:e=>a.onHeaderClick(e,t),onKeydown:e=>a.onHeaderKeyDown(e,t)},[p("div",B,[e.$slots.item?(r(),I(y(e.$slots.item),{key:1,item:t},null,8,["item"])):(r(),m(c,{key:0},[a.getItemProp(t,"to")&&!a.isItemDisabled(t)?(r(),I(l,{key:0,to:a.getItemProp(t,"to"),custom:""},{default:g((({navigate:s,href:i,isActive:n,isExactActive:o})=>[p("a",{href:i,class:h(a.getHeaderActionClass(t,{isActive:n,isExactActive:o})),tabindex:-1,onClick:e=>a.onHeaderActionClick(e,s)},[e.$slots.headericon?(r(),I(y(e.$slots.headericon),{key:0,item:t,class:h(a.getHeaderIconClass(t))},null,8,["item","class"])):a.getItemProp(t,"icon")?(r(),m("span",{key:1,class:h(a.getHeaderIconClass(t))},null,2)):v("",!0),p("span",M,b(a.getItemLabel(t)),1)],10,O)])),_:2},1032,["to"])):(r(),m("a",{key:1,href:a.getItemProp(t,"url"),class:h(a.getHeaderActionClass(t)),tabindex:-1},[a.getItemProp(t,"items")?C(e.$slots,"submenuicon",{key:0,active:a.isItemActive(t)},(()=>[(r(),I(y(a.isItemActive(t)?"ChevronDownIcon":"ChevronRightIcon"),{class:"p-submenu-icon"}))])):v("",!0),e.$slots.headericon?(r(),I(y(e.$slots.headericon),{key:1,item:t,class:h(a.getHeaderIconClass(t))},null,8,["item","class"])):a.getItemProp(t,"icon")?(r(),m("span",{key:2,class:h(a.getHeaderIconClass(t))},null,2)):v("",!0),p("span",U,b(a.getItemLabel(t)),1)],10,_))],64))])],42,T),P(k,{name:"p-toggleable-content"},{default:g((()=>[f(p("div",{id:a.getContentId(i),class:"p-toggleable-content",role:"region","aria-labelledby":a.getHeaderId(i)},[a.getItemProp(t,"items")?(r(),m("div",j,[P(K,{panelId:a.getPanelId(i),items:a.getItemProp(t,"items"),templates:e.$slots,expandedKeys:s.expandedKeys,onItemToggle:a.changeExpandedKeys,onHeaderFocus:a.updateFocusedHeader,exact:s.exact},null,8,["panelId","items","templates","expandedKeys","onItemToggle","onHeaderFocus","exact"])])):v("",!0)],8,R),[[x,a.isItemActive(t)]])])),_:2},1024)],6)):v("",!0)],64)))),128))],8,N)};export{$ as default};