import{_ as h,c as w,s as f}from"./app.js";import{L as y}from"./LoadMoreButton.js";import{P as d}from"./PostShortcut.js";import"./swiper.js";const V={name:"ShowLatestEpisodes",components:{LoadMoreButton:y,CmmsResponsiveImage:w,PostShortcut:d},props:["element"],computed:{hasEpisode:function(){return typeof this.element.data.first_episode<"u"&&0<Object.keys(this.element.data.first_episode).length},hasRelated:function(){return typeof this.element.data.other_episodes<"u"&&0<this.element.data.other_episodes.length},postShortcut:function(){return f.getByName("postShortcut",d)}}},o=window.Vue.createElementVNode,i=window.Vue.resolveComponent,t=window.Vue.openBlock,r=window.Vue.createBlock,s=window.Vue.createCommentVNode,n=window.Vue.createElementBlock,c=window.Vue.toDisplayString,g=window.Vue.withCtx,k=window.Vue.createVNode,C=window.Vue.renderList,v=window.Vue.Fragment,B=window.Vue.resolveDynamicComponent,S=window.Vue.normalizeClass,L={key:0,class:"current-episode-wrapper"},E=o("h3",{class:"element-header"},"Aktuelle Sendung",-1),b={class:"episode-image"},N={class:"thumbnail"},R={key:0,class:"media-label"},x=o("span",{class:"media-label__label"},[o("span",{class:"media-label__icon iconSet"},"play_arrow")],-1),D=[x],F={class:"episode-entry"},I={class:"title"},M={class:"description"},P={key:1,class:"element-header"},z={key:2,class:"post-shortcuts -col-4"};function j(m,A,e,O,W,a){const _=i("CmmsResponsiveImage"),u=i("router-link"),p=i("LoadMoreButton");return t(),n("div",{class:S(["element",e.element.type,e.element.subtype])},[a.hasEpisode?(t(),n("div",L,[E,k(u,{class:"current-episode",href:e.element.data.first_episode.url,to:m.$routerLink(e.element.data.first_episode.url)},{default:g(()=>[o("span",b,[o("span",N,[e.element.data.first_episode.image?(t(),r(_,{key:0,fill:!0,image:e.element.data.first_episode.image},null,8,["image"])):s("",!0)]),e.element.data.first_episode.image?(t(),n("span",R,D)):s("",!0)]),o("span",F,[o("span",I,c(e.element.data.first_episode.title),1),o("span",M,c(e.element.data.first_episode.excerpt),1)])]),_:1},8,["href","to"])])):s("",!0),a.hasRelated?(t(),n("h3",P,"Weitere Folgen")):s("",!0),a.hasRelated?(t(),n("div",z,[(t(!0),n(v,null,C(e.element.data.other_episodes,l=>(t(),r(B(a.postShortcut),{post:l,key:l.post_id},null,8,["post"]))),128))])):s("",!0),a.hasRelated?(t(),r(p,{key:3,url:e.element.data.more_url},null,8,["url"])):s("",!0)],2)}const K=h(V,[["render",j]]);export{K as default};