import{_ as w}from"./gEruasct.js";import{_ as $}from"./CoMKAfwe.js";import{V as y,_ as C}from"./BvY57J1L.js";import{aa as E,cG as V,cA as z,cR as B,ch as M,$ as N,cl as A,bB as a,X as u,cS as m,W as _,c0 as d,c7 as t,Z as n,Y as p,a3 as i,F as x,bR as b,p as F}from"#entry";import"./CyrZsGpg.js";import"./BopM0vw7.js";import"./DsNA9-h5.js";import"./Cp3UUybv.js";import"./-GcL7px7.js";import"./CEoxYnb5.js";import"./R1_j74h_.js";const G={class:"d-block text-h4 font-weight-black text-center text-uppercase mt-10 mx-auto w-100 text-underline"},R={key:0,class:"d-block text-subtitle text-center w-100"},S={key:1,class:"position-relative my-4"},H={class:"events mt-sm-4 mt-2"},L={key:2,class:"mt-14 mb-3"},Z={key:3,class:"events"},U=E({__name:"[slug]",async setup(q){let r,h;const s=V("settings"),v=z(),{data:e}=([r,h]=B(()=>M(`/api/events/place/${v.params.id}`,"$GZe7wefqyG")),r=await r,h(),r);if(!e.value)throw N({status:404,statusMessage:`Place ${v.params?.id} not found`});return A(()=>{const o=`${s.value.title} - ${e.value?.place?.name}`;return{title:o,link:[{rel:"alternate",type:"application/rss+xml",title:o,href:s.value.baseurl+`/feed/rss/place/${e.value?.place.name}`},{rel:"alternate",type:"text/calendar",title:o,href:s.value.baseurl+`/feed/ics/place/${e.value?.place?.name}`}]}}),(o,D)=>{const g=w,k=$,f=C;return a(),u(F,{id:"home",class:"px-2 px-sm-6 pt-0"},{default:m(()=>[_("h1",G,[_("u",null,d(t(e).place?.name),1)]),t(e).place?.name!=="online"?(a(),n("span",R,d(t(e).place?.address),1)):p("",!0),t(s)?.allow_geolocation&&t(e).place?.latitude&&t(e).place?.longitude?(a(),n("div",S,[i(g,{place:t(e).place,height:"12rem"},null,8,["place"]),i(k,{place:t(e).place},null,8,["place"])])):p("",!0),_("section",H,[(a(!0),n(x,null,b(t(e).events,(l,c)=>(a(),u(y,{key:l.id,class:"event","model-value":c<9,options:{threshold:.5,rootMargin:"500px"}},{default:m(()=>[i(f,{event:l,lazy:c>9,"hide-thumbs":t(s).hide_thumbs},null,8,["event","lazy","hide-thumbs"])]),_:2},1032,["model-value"]))),128))]),t(e)?.pastEvents.length?(a(),n("h2",L,d(o.$t("common.past_events")),1)):p("",!0),t(e)?.pastEvents.length?(a(),n("section",Z,[(a(!0),n(x,null,b(t(e).pastEvents,(l,c)=>(a(),u(y,{key:l.id,class:"event","model-value":c<9,options:{threshold:.5,rootMargin:"500px"}},{default:m(()=>[i(f,{event:l,lazy:c>9,"hide-thumbs":t(s).hide_thumbs},null,8,["event","lazy","hide-thumbs"])]),_:2},1032,["model-value"]))),128))])):p("",!0)]),_:1})}}});export{U as default};
