import{_ as w}from"./DbVjANdU.js";import{_ as $}from"./Ede3LYUY.js";import{V as y,_ as C}from"./BYMeu8AK.js";import{J as E,K as V,L as z,M as B,N as M,O as N,P as A,E as a,A as u,B as m,c as _,Q as d,S as t,T as n,U as p,b as i,F as x,W as b,C as F}from"#entry";import"./DlTeSpWH.js";import"./Cr_2yWa2.js";import"./D96dsyvB.js";import"./CIr4U5gS.js";import"./5A-VMRTY.js";import"./LWaCnj-p.js";import"./DArAxlee.js";const L={class:"d-block text-h4 font-weight-black text-center text-uppercase mt-10 mx-auto w-100 text-underline"},S={key:0,class:"d-block text-subtitle text-center w-100"},G={key:1,class:"position-relative my-4"},H={class:"events mt-sm-4 mt-2"},P={key:2,class:"mt-14 mb-3"},T={key:3,class:"events"},Y=E({__name:"[slug]",async setup(q){let c,h;const s=V("settings"),v=z(),{data:e}=([c,h]=B(()=>M(`/api/events/place/${v.params.id}`,"$GZe7wefqyG")),c=await c,h(),c);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",L,[_("u",null,d(t(e).place?.name),1)]),t(e).place?.name!=="online"?(a(),n("span",S,d(t(e).place?.address),1)):p("",!0),t(s)?.allow_geolocation&&t(e).place?.latitude&&t(e).place?.longitude?(a(),n("div",G,[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,r)=>(a(),u(y,{key:l.id,class:"event","model-value":r<9,options:{threshold:.5,rootMargin:"500px"}},{default:m(()=>[i(f,{event:l,lazy:r>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",P,d(o.$t("common.past_events")),1)):p("",!0),t(e)?.pastEvents.length?(a(),n("section",T,[(a(!0),n(x,null,b(t(e).pastEvents,(l,r)=>(a(),u(y,{key:l.id,class:"event","model-value":r<9,options:{threshold:.5,rootMargin:"500px"}},{default:m(()=>[i(f,{event:l,lazy:r>9,"hide-thumbs":t(s).hide_thumbs},null,8,["event","lazy","hide-thumbs"])]),_:2},1032,["model-value"]))),128))])):p("",!0)]),_:1})}}});export{Y as default};
