import{t as e}from"./server-vWUUIwcT.js";import{n as t}from"./navigation-errors-BQycxhXM.js";import"./navigation.react-server-BAzL2M-8.js";import{t as n}from"./framework~index~page~page~page~page~page~page~page~page~page~page~page~layout~page~page~not~i8kfbi3w-C-cjSCxA.js";import{t as r}from"./json-ld-BCY_rg5t.js";import{n as i,r as a}from"./seo-DZnfTeUQ.js";import{a as o,t as s}from"./site-footer-5-SPPFpl.js";import{t as c}from"./sanitize-C32ufD2_.js";import{a as l}from"./db-CtpKtLAv.js";var u=e(()=>{throw Error(`Unexpectedly client reference export 'NewsImageViewer' is called on server`)},`5f72f55966ca`,`NewsImageViewer`),d=n();async function f({params:e}){let{slug:t}=await e,n=await l(t);return a({title:n?.title||`خبر گپیدو`,description:n?.excerpt||`تازه‌ترین خبرها و رویدادهای گپیدو`,path:`/news/${t}`,image:n?.image||`/og.png`,type:`article`,keywords:[n?.tag||`اخبار گپیدو`,`گپیدو`]})}async function p({params:e}){let{slug:n}=await e,a=await l(n);a||t();let f=c(/<[a-z][\s\S]*>/i.test(a.content)?a.content:a.content.split(`
`).filter(Boolean).map(e=>`<p>${e}</p>`).join(``));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r,{data:{"@context":`https://schema.org`,"@type":`NewsArticle`,headline:a.title,description:a.excerpt,image:a.image?[i(a.image)]:[i(`/og.png`)],url:i(`/news/${a.slug}`),inLanguage:`fa-IR`,author:{"@type":`Organization`,name:`گپیدو`},publisher:{"@type":`Organization`,name:`گپیدو`,logo:{"@type":`ImageObject`,url:i(`/gapido-logo.png`)}}}}),(0,d.jsx)(o,{}),(0,d.jsxs)(`main`,{children:[(0,d.jsxs)(`header`,{className:`article-header`,children:[(0,d.jsx)(`span`,{className:`eyebrow`,children:a.tag}),(0,d.jsx)(`h1`,{children:a.title}),(0,d.jsx)(`p`,{children:a.excerpt}),(0,d.jsx)(`small`,{className:`article-date`,children:a.date})]}),(0,d.jsx)(`article`,{className:`article-body`,children:(0,d.jsxs)(u,{children:[a.image&&(0,d.jsx)(`figure`,{className:`article-cover`,children:(0,d.jsx)(`img`,{src:a.image,alt:a.title})}),(0,d.jsx)(`div`,{className:`prose article-content`,dangerouslySetInnerHTML:{__html:f}})]})})]}),(0,d.jsx)(s,{})]})}export{p as default,f as generateMetadata};