import styles from '@/styles/MarkdownPage.module.scss';

import Navbar from './Navbar';

import Head from 'next/head';

type Props = {
  metadata?: any;
  children: React.ReactNode;
};

export default function MarkdownPage({ metadata, children }: Props) {

  return (
    <>
      <Head>
        <title>{`Flint Docs • ${metadata?.title}`}</title>

        <link rel="icon" href="/favicon.ico" />

        <meta name="description" content={metadata?.description} />
      </Head>

      <Navbar currentPage="docs" />

      <div className={`${styles.pageContent} ${styles.container}`}>
        <aside className={styles.sideBar}>
          <nav>
            tba
          </nav>
        </aside>
        <main className={styles.markdownContent}>
          <h1>{metadata?.title}</h1>

          <div>{children}</div>
        </main>
      </div>

      <footer>
        <p>
          Copyright &copy; { new Date().getFullYear() } Flint &amp; Flint Contributors.
        </p>
      </footer>
    </>
  );
}