import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import PWARegister from "@/components/PWARegister";
import { ThemeProvider } from "@/components/ThemeProvider";

const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
  title: "Compagnon du lagon - Pension Marama",
  description: "Votre guide numérique pour votre séjour à Fakarava",
  manifest: "/manifest.json",
  themeColor: "#0E7490",
  appleWebApp: {
    capable: true,
    statusBarStyle: "default",
    title: "Compagnon du lagon - Pension Marama",
  },
  viewport: {
    width: "device-width",
    initialScale: 1,
    maximumScale: 1,
    userScalable: false,
  },
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="fr" suppressHydrationWarning>
      <head>
        <link rel="icon" href="/logo-relais-marama.svg" type="image/svg+xml" />
        <link rel="apple-touch-icon" href="/logo-relais-marama.svg" />
      </head>
      <body className={inter.className}>
        <ThemeProvider
          attribute="class"
          defaultTheme="light"
          enableSystem={true}
          disableTransitionOnChange={false}
        >
          {children}
          <PWARegister />
        </ThemeProvider>
      </body>
    </html>
  );
}

