import type {Metadata} from 'next';
import './globals.css';
import { Toaster } from "@/components/ui/toaster"
import MainHeader from '@/components/main-header';
import PasswordGate from '@/components/password-gate';

export const metadata: Metadata = {
  title: 'Amor Mío',
  description: 'Un recuento de nuestros momentos inolvidables.',
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="es">
      <head>
        <link rel="preconnect" href="https://fonts.googleapis.com" />
        <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
        <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=PT+Sans:wght@400;700&display=swap" rel="stylesheet" />
        <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap" rel="stylesheet" />
      </head>
      <body className="font-body antialiased">
        <PasswordGate>
          <MainHeader />
          <main>{children}</main>
          <Toaster />
        </PasswordGate>
      </body>
    </html>
  );
}
