import{p as e,y as o}from"./chunk-S5YDGZLY-8C0F1WYf.js";import{g as m}from"./navbar-CsDY9Vx5.js";import{f as i}from"./formatDistanceToNow-z4D6_o5l.js";const x=({post:s})=>{var t;const a=(t=m(s.image))==null?void 0:t.url(),l=new Date(s.publishedDate),r=i(l,{addSuffix:!0});return e.jsxs("div",{className:"p-0 bg-white shadow-sm rounded-lg",children:[e.jsx("img",{src:a||"https://via.placeholder.com/400x300?text=No+Image",alt:"Blog Post",className:"w-full h-48 object-cover rounded-t-lg"}),e.jsxs("div",{className:"p-6",children:[e.jsx("div",{className:"flex  h-10",children:e.jsx(o,{className:"text-base font-semibold",to:`/blog/${s.slug.current}`,children:s.title})}),e.jsx("p",{className:"text-xs/10 text-red-800 font-medium",children:r})]})]})};export{x as B};
