import MarkdocRenderer from '@/components/Markdoc/Renderer'
import { AWQLayout } from '@/layouts/AWQLayout'
import { getContentByPath } from '@/lib/content/awq/collector'
import { notFound } from 'next/navigation'

export default async function Page({ params }: { params: { slug: string[] } }) {
  const article = await getContentByPath('')
  const breadcrumbs = ['awq']

  if (!article) {
    notFound()
  }

  return (
    <AWQLayout article={article} breadcrumbs={breadcrumbs}>
      <MarkdocRenderer content={article.content} className="meta-content" />
    </AWQLayout>
  )
}
