---
import yaml from "yaml";
import "../styles/base.css";
import BaseHead from "./BaseHead.astro";
import Header from "../components/layout/Header.astro";
import Footer from "../components/layout/Footer.astro";
import ThemeToggle from "../islands/ThemeToggle.jsx";
import Cookie from "../islands/Cookie.jsx";


import rawCookie from "../content/site/cookie.yaml?raw";
const cookieCfg = yaml.parse(rawCookie);
const { seo } = Astro.props;
---

<html lang="pl" class="scroll-smooth">
    <head>
    <BaseHead seo={seo} />
  </head>

  <body class="min-h-screen flex flex-col">
    <Header />

    <main class="flex-1">
      <slot />
      <Cookie client:load config={cookieCfg} />
    </main>

    <Footer />
    <div class="fixed right-4 bottom-4 z-50">
      <ThemeToggle client:load />
    </div>   
  </body>
</html>
