import type { Metadata, Viewport } from "next";
import { gotham } from "@/fonts";
import "./globals.css";

const siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3000";
const title = "Pubago sacki. | De la pub à gogoo !";
const description =
  "Pubago transforme les sacs en papier kraft en supports publicitaires mobiles et biodégradables. Fini le plastique dans le Grand Nokoué, chaque sac distribué devient un média.";

export const metadata: Metadata = {
  metadataBase: new URL(siteUrl),
  title: {
    default: title,
    template: "%s | Pubago",
  },
  description,
  applicationName: "Pubago",
  keywords: [
    "pubago",
    "sac kraft",
    "sac publicitaire",
    "papier kraft",
    "Bénin",
    "Cotonou",
    "Grand Nokoué",
    "publicité biodégradable",
    "anti plastique",
  ],
  authors: [{ name: "Pubago" }],
  creator: "Pubago",
  publisher: "Pubago",
  alternates: {
    canonical: "/",
  },
  openGraph: {
    type: "website",
    locale: "fr_BJ",
    url: siteUrl,
    siteName: "Pubago",
    title,
    description,
  },
  twitter: {
    card: "summary_large_image",
    title,
    description,
  },
  robots: {
    index: true,
    follow: true,
  },
};

export const viewport: Viewport = {
  width: "device-width",
  initialScale: 1,
  themeColor: "#1A6B2A",
};

import { Toaster } from "sonner";

export default function RootLayout({ children }: LayoutProps<"/">) {
  return (
    <html lang="fr" className={gotham.variable} suppressHydrationWarning>
      <body suppressHydrationWarning>
        {children}
        <Toaster richColors position="top-right" closeButton />
      </body>
    </html>
  );
}
