---
import Layout from 'layouts/Layout.astro';
import Header from 'components/widgets/Header.astro';
import Footer from 'components/widgets/Footer.astro';
import Announcement from 'components/widgets/Announcement.astro';

import { headerData, footerData } from 'navigation';

import type { MetaData } from 'types';

export interface Props {
  metadata?: MetaData;
}

const { metadata } = Astro.props;
---

<Layout metadata={metadata}>
  <div id="posts" class="flex flex-col min-h-screen">
    <!-- <slot name="announcement">
      <Announcement />
    </slot> -->
    <slot name="header">
      <Header {...headerData} isSticky showToggleTheme />
    </slot>
    <main>
      <slot />
    </main>
    <slot name="footer">
      <Footer {...footerData} />
    </slot>
  </div>
</Layout>
