import{_ as g,o as y,a as p,f as o,i as k,b as a,F as i,l as m,e as b,k as u,c as h,j as s,n as w,t as n,d as B,q as C,u as x,R as N}from"./index-igTJW-fG.js";import{S as V}from"./SectionHero-CZI787yI.js";const D={class:"section"},L={class:"container"},S={key:0,class:"filters"},I=["onClick"],A={key:1,class:"dim mono"},E={key:2,class:"grid grid--2 posts"},F={class:"post__head"},M={class:"pill"},R={class:"dim mono"},$={class:"muted"},j={class:"dim mono"},q={__name:"BlogView",setup(z){const c=u([]),d=u(!0),r=u("all");y(async()=>{try{c.value=await p.listPosts()}catch{}finally{d.value=!1}});const _=h(()=>{const t=new Map;t.set("all","All");for(const l of c.value)t.set(l.category,l.category_label);return Array.from(t,([l,e])=>({value:l,label:e}))}),v=h(()=>r.value==="all"?c.value:c.value.filter(t=>t.category===r.value));function f(t){try{return new Date(t).toLocaleDateString("en-IN",{year:"numeric",month:"short",day:"numeric"})}catch{return t}}return(t,l)=>(s(),o(i,null,[k(V,{eyebrow:"Insights",title:"Notes from the lab.",subtitle:"Engineering notes, architecture choices, and the occasional founder essay. Written by the team — not a content desk."}),a("section",D,[a("div",L,[_.value.length>1?(s(),o("div",S,[(s(!0),o(i,null,m(_.value,e=>(s(),o("button",{key:e.value,class:w(["filter",{"filter--active":r.value===e.value}]),onClick:H=>r.value=e.value},n(e.label),11,I))),128))])):b("",!0),d.value?(s(),o("div",A,"Loading…")):(s(),o("div",E,[(s(!0),o(i,null,m(v.value,e=>(s(),B(x(N),{key:e.slug,to:`/blog/${e.slug}`,class:"post"},{default:C(()=>[a("div",F,[a("span",M,n(e.category_label),1),a("span",R,n(e.read_time_minutes)+" min",1)]),a("h3",null,n(e.title),1),a("p",$,n(e.excerpt),1),a("span",j,n(e.author_name)+" · "+n(f(e.published_at)),1)]),_:2},1032,["to"]))),128))]))])])],64))}},G=g(q,[["__scopeId","data-v-ef9c96cd"]]);export{G as default};
