import{_ as b,o as k,w as x,f as n,b as s,i,q as r,u as c,R as u,t as a,F as w,l as B,a as V,m as D,k as m,j as l,h as _}from"./index-igTJW-fG.js";const L={key:0,class:"container section dim mono"},N={key:1,class:"section text-center"},P={class:"container"},R={key:2,class:"post-page"},F={class:"post-page__head"},C={class:"container"},I={class:"pill"},M={class:"dim mono post-page__meta"},S={class:"container post-page__body"},T={class:"post-page__excerpt"},j={key:0},q={key:1},A={class:"container post-page__footer"},E={__name:"BlogPostView",setup(W){const h=D(),e=m(null),d=m(!0),p=m(!1);async function v(o){d.value=!0,p.value=!1;try{e.value=await V.getPost(o),e.value?.title&&(document.title=`${e.value.title} — RisingCompute`)}catch{p.value=!0}finally{d.value=!1}}k(()=>v(h.params.slug)),x(()=>h.params.slug,o=>o&&v(o));function f(o){try{return new Date(o).toLocaleDateString("en-IN",{year:"numeric",month:"short",day:"numeric"})}catch{return o}}return(o,t)=>d.value?(l(),n("div",L,"Loading…")):p.value?(l(),n("section",N,[s("div",P,[t[1]||(t[1]=s("h1",null,"Post not found.",-1)),i(c(u),{to:"/blog",class:"btn btn--ghost"},{default:r(()=>[...t[0]||(t[0]=[_("Back to insights",-1)])]),_:1})])])):(l(),n("article",R,[s("header",F,[s("div",C,[i(c(u),{to:"/blog",class:"back-link"},{default:r(()=>[...t[2]||(t[2]=[_("← All insights",-1)])]),_:1}),s("span",I,a(e.value.category_label),1),s("h1",null,a(e.value.title),1),s("p",M,a(e.value.author_name)+" · "+a(f(e.value.published_at))+" · "+a(e.value.read_time_minutes)+" min read ",1)])]),s("div",S,[s("p",T,a(e.value.excerpt),1),(l(!0),n(w,null,B(e.value.body.split(/\n\n+/),(g,y)=>(l(),n("div",{class:"prose",key:y},[g.startsWith("## ")?(l(),n("h2",j,a(g.replace(/^##\s*/,"")),1)):(l(),n("p",q,a(g),1))]))),128))]),s("div",A,[i(c(u),{to:"/blog",class:"btn btn--ghost"},{default:r(()=>[...t[3]||(t[3]=[_("← More insights",-1)])]),_:1}),i(c(u),{to:"/contact",class:"btn btn--primary"},{default:r(()=>[...t[4]||(t[4]=[_("Talk to us",-1)])]),_:1})])]))}},z=b(E,[["__scopeId","data-v-c1908f38"]]);export{z as default};
