import { Header } from "@/components/header";
import { Toaster } from "@/components/ui/toaster";
import type { Metadata } from "next";

import "@/app/globals.css";

export const metadata: Metadata = {
	title: {
		default: "MYP",
		template: "%s | MYP",
	},
	description: "Generated by create next app",
};

interface RootLayoutProps {
	children: React.ReactNode;
}

export const dynamic = "force-dynamic";

export default function RootLayout(props: RootLayoutProps) {
	const { children } = props;

	return (
		<html lang="de" suppressHydrationWarning>
			<head />
			<body className={"min-h-dvh bg-muted font-sans antialiased"}>
				<Header />
				<main className="flex-grow max-w-screen-2xl w-full mx-auto flex flex-col p-8 gap-4 text-foreground">
					{children}
				</main>
				<Toaster />
			</body>
		</html>
	);
}
