import{_ as g,o as t,c as h,d as s,f as a,g as o,e as f,y,t as _,h as p}from"./yffbDggw.js";import{_ as m}from"./ByZpMwW7.js";import{_ as x}from"./C6BqH1Wu.js";import{d as k}from"./DJCocG2P.js";const v={name:"RelatedCourse",components:{Labels:m},props:{course:{type:Object,default:()=>({})},baseUrl:{type:String,default:""}},data:()=>({dateToStringWithNameMonth:k}),computed:{getDateLastSession(){return this.course.list_of_sessions!=null?this.course.list_of_sessions[this.course.list_of_sessions.length-1].date:null}}},C={class:"pt-course-base"},S={class:"pt-course-base__overlay"},L={class:"pt-course-base__wrapper"},N={class:"pt-course-base__content"},D=["textContent"],B=["textContent"];function w(n,R,e,T,V,c){var r,i,u;const d=p,l=m,b=x;return t(),h("div",C,[s("div",S,[s("div",L,[(i=(r=e.course)==null?void 0:r.main_image)!=null&&i.url?(t(),a(d,{key:e.course.id,alt:e.course.main_image.alternativeText||"course-image",title:e.course.meta_title,src:((u=e.course.main_image)==null?void 0:u.url)||""||"",loading:"lazy"},null,8,["alt","title","src"])):o("",!0),e.course.recommended?(t(),a(l,{key:1,"label-type":"gray","label-text":n.$t("ui.label.recommended"),class:"absolute top-0 p-4"},null,8,["label-text"])):o("",!0),e.course.last_places?(t(),a(l,{key:2,"label-type":"red","label-text":n.$t("ui.label.lastPlaces"),class:"absolute top-0 p-4"},null,8,["label-text"])):o("",!0),c.getDateLastSession?(t(),a(l,{key:c.getDateLastSession,"label-type":"white",items:n.dateToStringWithNameMonth(c.getDateLastSession),class:"absolute bottom-0 p-4"},null,8,["items"])):o("",!0)])]),s("div",N,[s("div",null,[f(b,{to:`${e.baseUrl}/${e.course.slug}`},{default:y(()=>[s("span",{textContent:_(e.course.meta_title)},null,8,D)]),_:1},8,["to"]),s("p",{textContent:_(e.course.abstract)},null,8,B)]),e.course.tags.length?(t(),a(l,{key:0,"label-type":"transparent",items:e.course.tags,class:"mt-3","to-search":"events"},null,8,["items"])):o("",!0)])])}const j=g(v,[["render",w],["__scopeId","data-v-972d2b07"]]);export{j as R};