import{A as e,C as t,D as n,E as r,J as i,K as a,M as o,b as s,i as c,j as l,kt as u,ot as d,r as f,w as p,wt as m}from"./dist-B4ulKgpj.js";import{t as h}from"./FrontOfficeLayout-PUirTnzN.js";var g={class:`bg-[#0a3160] text-white`},_={class:`mx-auto max-w-6xl px-4 py-14 sm:px-6`},v={class:`mt-3 max-w-3xl text-3xl font-semibold md:text-4xl`},y={key:0,class:`mt-2 text-lg text-[#d8e8f7]`},b={class:`mt-4 text-sm text-[#d8e8f7]`},x={class:`mx-auto max-w-6xl px-4 py-10 sm:px-6`},S={class:`grid gap-8 lg:grid-cols-[2fr_1fr]`},C={class:`rounded-xl border border-[#d9e3ef] bg-white p-5 md:p-7`},w=[`src`,`alt`],T=[`innerHTML`],E={key:2,class:`mt-6`},D=[`href`],O={class:`mx-auto max-w-6xl px-4 pb-14 sm:px-6`},k={class:`flex items-center justify-between`},A={key:0,class:`mt-6 text-sm text-[#436489]`},j={key:1,class:`mt-6 grid gap-6 md:grid-cols-3`},M=[`src`,`alt`],N={class:`p-5`},P={class:`text-xs font-semibold tracking-wide text-[#436489] uppercase`},F={class:`mt-2 font-semibold`},I={class:`mt-2 text-sm text-[#234e7a]`},L=o({layout:h,__name:`ArticleView`,props:{article:{},otherArticles:{}},setup(o){let h=o,L=t(()=>Array.isArray(h.otherArticles)?h.otherArticles:h.otherArticles?.data??[]),R=t(()=>/<\/?[a-z][\s\S]*>/i.test(h.article.content)),z=t(()=>R.value?[]:h?.article?.content?h.article.content.split(/\n\n/).filter(e=>e.trim().length>0):[]),B=t(()=>L.value.slice(0,3));return(t,h)=>(a(),n(s,null,[l(m(f),{title:o.article.title},null,8,[`title`]),p(`section`,g,[p(`div`,_,[h[0]||=p(`p`,{class:`text-xs tracking-[0.2em] text-[#bfd4eb] uppercase`},` Articles `,-1),p(`h1`,v,u(o.article.title),1),o.article.subtitle?(a(),n(`p`,y,u(o.article.subtitle),1)):r(``,!0),p(`p`,b,u(o.article.publishedAt),1)])]),p(`section`,x,[p(`div`,S,[p(`article`,C,[p(`img`,{src:o.article.image,alt:o.article.title,class:`h-64 w-full rounded-lg object-cover md:h-96`},null,8,w),R.value?(a(),n(`div`,{key:0,class:`prose prose-slate prose-headings:text-[#0a3160] prose-a:text-[#0a3160] mt-5 max-w-none text-[#234e7a]`,innerHTML:o.article.content},null,8,T)):(a(!0),n(s,{key:1},i(z.value,(e,t)=>(a(),n(`p`,{key:t,class:`mt-5 leading-7 text-[#234e7a]`},u(e),1))),128)),o.article.link?(a(),n(`p`,E,[p(`a`,{href:o.article.link,class:`text-sm font-semibold text-[#0a3160] underline`,target:`_blank`,rel:`noopener noreferrer`},` Related link `,8,D)])):r(``,!0)]),h[1]||=p(`aside`,{class:`rounded-xl border border-[#d9e3ef] bg-white p-6`},[p(`h2`,{class:`text-lg font-semibold text-[#0a3160]`},`Ad Space`),p(`div`,{class:`mt-4 flex min-h-[300px] items-center justify-center rounded-lg border border-dashed border-[#aac0d8] bg-[#f8fbff] p-6 text-center text-sm text-[#436489]`},` Your ad can appear here `)],-1)])]),p(`section`,O,[p(`div`,k,[h[3]||=p(`h2`,{class:`text-2xl font-semibold`},`Other Articles`,-1),l(m(c),{href:`/articles`,class:`text-sm font-semibold text-[#0a3160] hover:underline`},{default:d(()=>[...h[2]||=[e(` View all `,-1)]]),_:1})]),B.value.length===0?(a(),n(`p`,A,` No other articles available yet. `)):(a(),n(`div`,j,[(a(!0),n(s,null,i(B.value,t=>(a(),n(`article`,{key:t.id,class:`overflow-hidden rounded-xl border border-[#d9e3ef] bg-white shadow-sm`},[p(`img`,{src:t.image,alt:t.title,class:`h-40 w-full object-cover`},null,8,M),p(`div`,N,[p(`p`,P,u(t.publishedAt),1),p(`h3`,F,u(t.title),1),p(`p`,I,u(t.excerpt),1),l(m(c),{href:`/articles/${t.id}`,class:`mt-3 inline-block text-sm font-semibold text-[#0a3160] hover:underline`},{default:d(()=>[...h[4]||=[e(` Read article `,-1)]]),_:1},8,[`href`])])]))),128))]))])],64))}});export{L as default};