import{_ as k}from"./CyrZsGpg.js";import{_ as C}from"./BopM0vw7.js";import{u as z}from"./DsNA9-h5.js";import{aa as I,bB as t,Z as r,a3 as a,cS as c,X as d,Y as i,r as u,c7 as o,W as l,bm as V,c0 as m,F as T,bR as w,a2 as M,O as p,au as D,cv as _,cw as B,cT as P,bo as F,ce as H,bI as L,bb as $,b0 as E,a_ as N}from"#entry";import{a as R,V as S,I as x,m as O,M as j}from"./Cp3UUybv.js";import{V as A}from"./-GcL7px7.js";import{V as U}from"./R1_j74h_.js";const W={class:"h-event event-card",itemscope:"",itemtype:"https://schema.org/Event"},X={class:"d-flex ga-2 align-center mb-1"},Y=["datetime","content"],Z=["content"],q={class:"d-flex ga-2 align-center"},G={itemprop:"name"},J={class:"d-none",itemprop:"address"},K={key:0,class:"d-flex flex-wrap ga-1 mt-3"},Q=I({__name:"Card",props:{event:{},lazy:{type:Boolean,default:!1},hideThumbs:{type:Boolean,default:!1}},setup(e){const n=z(),v=p(()=>{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=p(()=>e.event.status==="EventCancelled");return(s,g)=>{const f=k,b=C;return t(),r("article",W,[a(b,{to:`/event/${e.event.slug||e.event.id}`,itemprop:"url"},{default:c(()=>[e.hideThumbs?i("",!0):(t(),d(f,{key:0,event:e.event,thumb:"",lazy:e.lazy},null,8,["event","lazy"])),e.event.parentId?(t(),d(u,{key:1,class:"float-right mr-1",color:"success",icon:"mdi-repeat"})):i("",!0),o(v)?(t(),d(u,{key:2,class:"float-right mr-1",color:"warning",icon:"mdi-timer-sand"})):i("",!0),l("h3",{class:V(["event-title",o(y)&&"text-decoration-line-through"]),itemprop:"name"},m(e.event.title),3)]),_:1},8,["to"]),e.event?.ap_user?.image?(t(),d(S,{key:0,size:"small",class:"position-absolute top-0 right-0 ma-2 pointer-ev-none"},{default:c(()=>[a(R,{src:e.event.ap_user.image,alt:e.event.ap_user.name},null,8,["src","alt"])]),_:1})):i("",!0),a(U,{class:"pt-0 pb-3"},{default:c(()=>[l("div",X,[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,Y),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,Z)):i("",!0)]),l("div",q,[a(u,{icon:"mdi-map-marker"}),a(b,{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:c(()=>[l("span",G,m(e.event.place.name),1)]),_:1},8,["to"]),l("div",J,m(e.event.place.address),1)]),e.event?.tags?.length?(t(),r("div",K,[(t(!0),r(T,null,w(e.event?.tags?.slice(0,6),h=>(t(),d(A,{key:h,size:"small",label:"",to:`/tag/${encodeURIComponent(h)}`,variant:"outlined",color:"primary"},{default:c(()=>[M(m(h),1)]),_:2},1032,["to"]))),128))])):i("",!0)]),_:1})])}}}),me=Object.assign(Q,{__name:"EventCard"}),ee=L({modelValue:Boolean,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},...N(),...E(),...$(),...O({transition:"fade-transition"})},"VLazy"),ce=D()({name:"VLazy",directives:{vIntersect:x},props:ee(),emits:{"update:modelValue":e=>!0},setup(e,n){let{slots:v}=n;const{dimensionStyles:y}=H(e),s=_(e,"modelValue");function g(f){s.value||(s.value=f)}return B(()=>P(a(e.tag,{class:V(["v-lazy",e.class]),style:F([y.value,e.style])},{default:()=>[s.value&&a(j,{transition:e.transition,appear:!0},{default:()=>[v.default?.()]})]}),[[x,{handler:g,options:e.options},null]])),{}}});export{ce as V,me as _};
