import{a as I,_ as w,c as S,S as E,s as A}from"./app.js";import{T as y}from"./ThumbNavigationLink.js";import"./swiper.js";const D=window.Vue.defineAsyncComponent,O=D(()=>I(()=>Promise.resolve().then(()=>te),void 0)),F={name:"NavigationSubMenu",components:{NavigationItem:O},props:["items"]},T=window.Vue.renderList,z=window.Vue.Fragment,V=window.Vue.openBlock,C=window.Vue.createElementBlock,P=window.Vue.resolveComponent,R=window.Vue.createBlock,j={class:"sub-menu"};function K(a,n,e,g,v,t){const l=P("navigation-item");return V(),C("ul",j,[(V(!0),C(z,null,T(e.items,s=>(V(),R(l,{key:s.id,item:s,"show-image":!1},null,8,["item"]))),128))])}const U=w(F,[["render",K]]),q={name:"NavigationItem",components:{CmmsResponsiveImage:S,NavigationSubMenu:U,SoylentLink:E},data:function(){return{subMenuOpen:!1}},props:["item","showImage"],computed:{itemClasses:function(){let a=this.item.classes;return this.item.items&&(a+=" menu-item-has-children"),this.subMenuOpen&&(a+=" --open"),a}},methods:{toggleSubmenu:function(){this.subMenuOpen=!this.subMenuOpen},closeModal:function(){this.$store.dispatch("closeCategoryModal")}}},k=window.Vue.resolveComponent,r=window.Vue.openBlock,b=window.Vue.createBlock,h=window.Vue.createCommentVNode,m=window.Vue.createElementBlock,G=window.Vue.toDisplayString,H=window.Vue.createElementVNode,J=window.Vue.withCtx,Q=window.Vue.createVNode,W=window.Vue.normalizeClass,X={key:0,class:"item-thumb"},Y={key:1,class:"responsive-image"},Z={class:"item-label"};function ee(a,n,e,g,v,t){const l=k("CmmsResponsiveImage"),s=k("soylent-link"),o=k("NavigationSubMenu");return r(),m("li",{class:W(["item",t.itemClasses])},[Q(s,{onClick:t.closeModal,url:e.item.url,class:"item-link"},{default:J(()=>[e.showImage?(r(),m("span",X,[e.item.image?(r(),b(l,{key:0,image:e.item.image,fill:!0},null,8,["image"])):(r(),m("span",Y))])):h("",!0),H("span",Z,G(e.item.label),1)]),_:1},8,["onClick","url"]),e.item.items?(r(),m("span",{key:0,class:"iconSet --dropdown",onClick:n[0]||(n[0]=(...L)=>t.toggleSubmenu&&t.toggleSubmenu(...L))},"expand_more")):h("",!0),e.item.items?(r(),b(o,{key:1,items:e.item.items},null,8,["items"])):h("",!0)],2)}const x=w(q,[["render",ee]]),te=Object.freeze(Object.defineProperty({__proto__:null,default:x},Symbol.toStringTag,{value:"Module"})),ne={name:"ArchiveNavigationCategoryModal",components:{NavigationItem:x},props:["items"],methods:{close:function(){this.$store.dispatch("closeCategoryModal")}},beforeUnmount(){this.close()}},u=window.Vue.createElementVNode,oe=window.Vue.renderList,se=window.Vue.Fragment,p=window.Vue.openBlock,f=window.Vue.createElementBlock,ie=window.Vue.resolveComponent,ae=window.Vue.createBlock,le={class:"category-modal --open"},ce={class:"category-modal-inner"},re={class:"category-menu"};function me(a,n,e,g,v,t){const l=ie("navigation-item");return p(),f("div",le,[u("div",ce,[u("div",{class:"close-button",onClick:n[0]||(n[0]=(...s)=>t.close&&t.close(...s))},n[1]||(n[1]=[u("span",{class:"close-button__icon iconSet"},"close",-1)])),u("ul",re,[(p(!0),f(se,null,oe(e.items,s=>(p(),ae(l,{key:s.id,item:s,"show-image":!0},null,8,["item"]))),128))])])])}const ue=w(ne,[["render",me]]),de={name:"SoylentArchiveNavigation",components:{SoylentLink:E,ArchiveNavigationCategoryModal:ue,ThumbNavigationLink:y,CmmsResponsiveImage:S},props:["element"],computed:{thumbNavigationLink:function(){return A.getByName("thumbNavigationLink",y)},showCategoryModal:function(){return this.element.data.items_modal.length>0}},methods:{toggleCategoryModal:function(){this.$store.dispatch("toggleCategoryModal")}}},d=window.Vue.createElementVNode,i=window.Vue.openBlock,c=window.Vue.createElementBlock,_=window.Vue.createCommentVNode,N=window.Vue.resolveComponent,$=window.Vue.createBlock,B=window.Vue.renderList,M=window.Vue.Fragment,_e=window.Vue.toDisplayString,we=window.Vue.createTextVNode,ge=window.Vue.withCtx,ve=window.Vue.createVNode,Ve=window.Vue.resolveDynamicComponent,ke=window.Vue.normalizeClass,he={key:2,class:"breadcrumb"},pe={key:3,class:"thumb-navigation-wrapper"},ye={class:"thumb-navigation"};function Ce(a,n,e,g,v,t){const l=N("archive-navigation-category-modal"),s=N("soylent-link");return i(),c("div",{class:ke(["element",e.element.type,e.element.subtype])},[t.showCategoryModal?(i(),c("a",{key:0,onClick:n[0]||(n[0]=(...o)=>t.toggleCategoryModal&&t.toggleCategoryModal(...o)),class:"button --category-filter"},n[1]||(n[1]=[d("span",{class:"button__label"},[d("span",{class:"button__icon iconSet"},"list"),d("span",{class:"button__text"},"Kategorieauswahl")],-1)]))):_("",!0),t.showCategoryModal?(i(),$(l,{key:1,items:e.element.data.items_modal},null,8,["items"])):_("",!0),e.element.data.breadcrumb.length>0?(i(),c("ul",he,[(i(!0),c(M,null,B(e.element.data.breadcrumb,o=>(i(),c("li",{key:o.url},[ve(s,{url:o.url},{default:ge(()=>[we(_e(o.label),1)]),_:2},1032,["url"])]))),128))])):_("",!0),e.element.data.items.length>0?(i(),c("div",pe,[d("div",ye,[(i(!0),c(M,null,B(e.element.data.items,o=>(i(),$(Ve(t.thumbNavigationLink),{url:o.url,image:o.image,color:o.color,label:o.label,key:o.term_id},null,8,["url","image","color","label"]))),128))])])):_("",!0)],2)}const $e=w(de,[["render",Ce]]);export{$e as default};