import type { ArticleContent } from '@/lib/types/content';
import { Author, Tag } from '@/lib/types/taxonomy';
import Header from './Header';
import Content from '@/components/Article/Content';

import styles from './Article.module.css';

interface ArticleProps {
  article: ArticleContent;
  author: Author | null;
  tags: Tag[];
  breadcrumbs?: string[];
}

export default function Article({
  article,
  author,
  tags,
  breadcrumbs,
}: ArticleProps) {
  return (
    <article className={styles.article}>
      <Header
        article={article}
        author={author}
        tags={tags}
        breadcrumbs={breadcrumbs}
      />
      <Content article={article} />
    </article>
  );
}
