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,s,e,g,h,t){const c=P("navigation-item");return v(),C("ul",j,[(v(!0),C(z,null,T(e.items,o=>(v(),R(c,{key:o.id,item:o,"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")}}},V=window.Vue.resolveComponent,r=window.Vue.openBlock,b=window.Vue.createBlock,k=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,s,e,g,h,t){const c=V("CmmsResponsiveImage"),o=V("soylent-link"),n=V("NavigationSubMenu");return r(),m("li",{class:W(["item",t.itemClasses])},[Q(o,{onClick:t.closeModal,url:e.item.url,class:"item-link"},{default:J(()=>[e.showImage?(r(),m("span",X,[e.item.image?(r(),b(c,{key:0,image:e.item.image,fill:!0},null,8,["image"])):(r(),m("span",Y))])):k("",!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:s[0]||(s[0]=(...L)=>t.toggleSubmenu&&t.toggleSubmenu(...L))},"expand_more")):k("",!0),e.item.items?(r(),b(n,{key:1,items:e.item.items},null,8,["items"])):k("",!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()}},d=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,ce={class:"category-modal --open"},le={class:"category-modal-inner"},re=d("span",{class:"close-button__icon iconSet"},"close",-1),me=[re],ue={class:"category-menu"};function de(a,s,e,g,h,t){const c=ie("navigation-item");return p(),f("div",ce,[d("div",le,[d("div",{class:"close-button",onClick:s[0]||(s[0]=(...o)=>t.close&&t.close(...o))},me),d("ul",ue,[(p(!0),f(se,null,oe(e.items,o=>(p(),ae(c,{key:o.id,item:o,"show-image":!0},null,8,["item"]))),128))])])])}const _e=w(ne,[["render",de]]),we={name:"SoylentArchiveNavigation",components:{SoylentLink:E,ArchiveNavigationCategoryModal:_e,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")}}},_=window.Vue.createElementVNode,i=window.Vue.openBlock,l=window.Vue.createElementBlock,u=window.Vue.createCommentVNode,N=window.Vue.resolveComponent,$=window.Vue.createBlock,B=window.Vue.renderList,M=window.Vue.Fragment,ge=window.Vue.toDisplayString,he=window.Vue.createTextVNode,ve=window.Vue.withCtx,Ve=window.Vue.createVNode,ke=window.Vue.resolveDynamicComponent,pe=window.Vue.normalizeClass,ye=_("span",{class:"button__label"},[_("span",{class:"button__icon iconSet"},"list"),_("span",{class:"button__text"},"Kategorieauswahl")],-1),Ce=[ye],be={key:2,class:"breadcrumb"},fe={key:3,class:"thumb-navigation-wrapper"},Ne={class:"thumb-navigation"};function $e(a,s,e,g,h,t){const c=N("archive-navigation-category-modal"),o=N("soylent-link");return i(),l("div",{class:pe(["element",e.element.type,e.element.subtype])},[t.showCategoryModal?(i(),l("a",{key:0,onClick:s[0]||(s[0]=(...n)=>t.toggleCategoryModal&&t.toggleCategoryModal(...n)),class:"button --category-filter"},Ce)):u("",!0),t.showCategoryModal?(i(),$(c,{key:1,items:e.element.data.items_modal},null,8,["items"])):u("",!0),e.element.data.breadcrumb.length>0?(i(),l("ul",be,[(i(!0),l(M,null,B(e.element.data.breadcrumb,n=>(i(),l("li",{key:n.url},[Ve(o,{url:n.url},{default:ve(()=>[he(ge(n.label),1)]),_:2},1032,["url"])]))),128))])):u("",!0),e.element.data.items.length>0?(i(),l("div",fe,[_("div",Ne,[(i(!0),l(M,null,B(e.element.data.items,n=>(i(),$(ke(t.thumbNavigationLink),{url:n.url,image:n.image,color:n.color,label:n.label,key:n.term_id},null,8,["url","image","color","label"]))),128))])])):u("",!0)],2)}const Ee=w(we,[["render",$e]]);export{Ee as default};