import{_ as b}from"./DlTeSpWH.js";import{_ as C}from"./Cr_2yWa2.js";import{u as z}from"./D96dsyvB.js";import{J as w,E as t,T as r,b as a,B as d,A as c,U as i,h as u,S as o,c as l,n as k,Q as m,F as T,W as I,G as M,i as x,g as D,k as B,a as P,w as _,ah as F,aA as H,p as E,aw as L,au as $,az as A}from"#entry";import{a as N,V as S,I as V,m as R,M as U}from"./CIr4U5gS.js";import{V as j}from"./5A-VMRTY.js";import{V as O}from"./DArAxlee.js";const G={class:"h-event event-card",itemscope:"",itemtype:"https://schema.org/Event"},J={class:"d-flex ga-2 align-center mb-1"},Q=["datetime","content"],W=["content"],q={class:"d-flex ga-2 align-center"},K={itemprop:"name"},X={class:"d-none",itemprop:"address"},Y={key:0,class:"d-flex flex-wrap ga-1 mt-3"},Z=w({__name:"Card",props:{event:{},lazy:{type:Boolean,default:!1},hideThumbs:{type:Boolean,default:!1}},setup(e){const n=z(),v=x(()=>{const s=new Date;return e.event.end_datetime?new Date(e.event.end_datetime*1e3)<s:new Date((10800+e.event.start_datetime)*1e3)<s}),y=x(()=>e.event.status==="EventCancelled");return(s,g)=>{const f=b,p=C;return t(),r("article",G,[a(p,{to:`/event/${e.event.slug||e.event.id}`,itemprop:"url"},{default:d(()=>[e.hideThumbs?i("",!0):(t(),c(f,{key:0,event:e.event,thumb:"",lazy:e.lazy},null,8,["event","lazy"])),e.event.parentId?(t(),c(u,{key:1,class:"float-right mr-1",color:"success",icon:"mdi-repeat"})):i("",!0),o(v)?(t(),c(u,{key:2,class:"float-right mr-1",color:"warning",icon:"mdi-timer-sand"})):i("",!0),l("h3",{class:k(["event-title",o(y)&&"text-decoration-line-through"]),itemprop:"name"},m(e.event.title),3)]),_:1},8,["to"]),e.event?.ap_user?.image?(t(),c(S,{key:0,size:"small",class:"position-absolute top-0 right-0 ma-2 pointer-ev-none"},{default:d(()=>[a(N,{src:e.event.ap_user.image,alt:e.event.ap_user.name},null,8,["src","alt"])]),_:1})):i("",!0),a(O,{class:"pt-0 pb-3"},{default:d(()=>[l("div",J,[a(u,{icon:"mdi-calendar"}),l("time",{class:"dt-start text-body-2 text-md-body-1",datetime:o(n).unixFormat(e.event.start_datetime,"yyyy-MM-dd HH:mm"),itemprop:"startDate",content:o(n).unixFormat(e.event.start_datetime,"yyyy-MM-dd'T'HH:mm")},m(o(n).when(e.event)),9,Q),e.event.end_datetime?(t(),r("time",{key:0,class:"d-none dt-end",itemprop:"endDate",content:o(n).unixFormat(e.event.end_datetime,"yyyy-MM-dd'T'HH:mm")},m(o(n).unixFormat(e.event.end_datetime)),9,W)):i("",!0)]),l("div",q,[a(u,{icon:"mdi-map-marker"}),a(p,{class:"place p-location text-body-2 text-md-body-1",to:`/place/${e.event?.place?.id}/${encodeURIComponent(e.event.place.name)}`,itemprop:"location",itemscope:"",itemtype:"https://schema.org/Place"},{default:d(()=>[l("span",K,m(e.event.place.name),1)]),_:1},8,["to"]),l("div",X,m(e.event.place.address),1)]),e.event?.tags?.length?(t(),r("div",Y,[(t(!0),r(T,null,I(e.event?.tags?.slice(0,6),h=>(t(),c(j,{key:h,size:"small",label:"",to:`/tag/${encodeURIComponent(h)}`,variant:"outlined",color:"primary"},{default:d(()=>[M(m(h),1)]),_:2},1032,["to"]))),128))])):i("",!0)]),_:1})])}}}),me=Object.assign(Z,{__name:"EventCard"}),ee=E({modelValue:Boolean,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},...A(),...$(),...L(),...R({transition:"fade-transition"})},"VLazy"),de=D()({name:"VLazy",directives:{vIntersect:V},props:ee(),emits:{"update:modelValue":e=>!0},setup(e,n){let{slots:v}=n;const{dimensionStyles:y}=H(e),s=B(e,"modelValue");function g(f){s.value||(s.value=f)}return P(()=>_(a(e.tag,{class:k(["v-lazy",e.class]),style:F([y.value,e.style])},{default:()=>[s.value&&a(U,{transition:e.transition,appear:!0},{default:()=>[v.default?.()]})]}),[[V,{handler:g,options:e.options},null]])),{}}});export{de as V,me as _};
