import{j as e,N as d,g as i}from"./vendor-laZsiqLO.js";import{u as c}from"./useTranslation-BW0o-tkY.js";function f({categoryName:o,posts:t}){const{t:l}=c();if(!t||t.length===0)return null;const s=t[0],n=t.slice(1),a=r=>`https://ui-avatars.com/api/?name=${encodeURIComponent(r)}&background=random&color=fff&size=512`;return e.jsxs("div",{className:"my-10 border-t border-b border-border py-8 animate-in fade-in not-prose font-sans",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[e.jsx("div",{className:"bg-primary/10 p-1.5 rounded-full",children:e.jsx(d,{className:"w-4 h-4 text-primary"})}),e.jsxs("h3",{className:"font-bold text-xl text-foreground font-serif tracking-tight",children:[l("_more_in","More in")," ",o||l("_news_title","News")]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[e.jsxs(i,{href:s.route_url,prefetch:!0,className:"group block no-underline",children:[e.jsx("div",{style:{borderRadius:"var(--radius)"},className:"aspect-[16/10] w-full overflow-hidden bg-muted mb-3 relative border border-border shadow-sm",children:e.jsx("img",{src:s.image_path||a(s.title),alt:s.title,className:"w-full h-full object-cover"})}),e.jsx("h4",{className:"font-bold text-lg md:text-xl leading-snug group-hover:text-primary transition-colors font-serif mt-3",children:s.title})]}),e.jsx("div",{className:"flex flex-col gap-5 justify-center",children:n.map(r=>e.jsxs(i,{href:r.route_url,prefetch:!0,className:"group flex gap-4 items-start border-b border-border/50 pb-5 last:border-0 last:pb-0 no-underline",children:[e.jsx("div",{style:{borderRadius:"calc(var(--radius) - 2px)"},className:"w-28 h-20 shrink-0 bg-muted overflow-hidden border border-border relative",children:e.jsx("img",{src:r.image_path||a(r.title),alt:r.title,className:"w-full h-full object-cover"})}),e.jsx("h5",{className:"text-base font-semibold leading-snug group-hover:text-primary transition-colors line-clamp-3 flex-1 min-w-0 font-serif",children:r.title})]},r.id))})]})]})}export{f as default};
