import{E as s,T as l,S as t,ah as h,n,U as d}from"#entry";const g=["alt","loading","src","srcset","height","width"],p={key:1,class:"thumb",src:"/fallbackimage.png",alt:""},w={__name:"CoreImg",props:{event:{type:Object,default:()=>({})},thumb:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},showPreview:{type:Boolean,default:!0}},setup(a){const o=a,e=o.event.media?.[0],i=e?.focalpoint?`${(e?.focalpoint[0]+1)*50}% ${(e?.focalpoint[1]+1)*50}%`:"center center",c=o.thumb?"":`/media/thumb/${e?.url} 500w, /media/${e?.url} 1200w`,r=e?.height??"auto",m=e?.width??"auto",u=e?.url?"/media/thumb/"+e?.url:o.thumb&&"/fallbackimage.png";return(f,b)=>(s(),l("div",{class:n({img:!0,thumb:a.thumb})},[t(e)?(s(),l("img",{key:0,class:n({"u-featured":!0}),alt:t(e).name,loading:a.lazy?"lazy":"eager",src:t(u),srcset:t(c),itemprop:"image",height:t(r),width:t(m),style:h({"object-position":t(i)})},null,12,g)):t(e)?d("",!0):(s(),l("img",p))],2))}};export{w as _};
