import type { Metadata } from "next";
import Script from "next/script";
import "./globals.css";

export const metadata: Metadata = {
  title: "geo-spatial.org Data Hub",
  description:
    "Selectează geometrii administrative ale României, îmbină-le cu date statistice și descarcă rezultatele în format GeoPackage sau GeoJSON.",
  keywords: [
    "date statistice",
    "România",
    "GIS",
    "geospațial",
    "județe",
    "UAT",
    "GeoPackage",
    "GeoJSON",
  ],
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="ro">
      <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=Inter:wght@400;500;600;700&display=swap"
          rel="stylesheet"
        />
        <link rel="preconnect" href="https://www.googletagmanager.com" />
        <link rel="icon" href="https://geo-spatial.org/img/favicon.ico" />
      </head>
      <body>
        <Script
          src="https://www.googletagmanager.com/gtag/js?id=G-68DEKWGBTM"
          strategy="afterInteractive"
        />
        <Script id="google-analytics" strategy="afterInteractive">
          {`window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date);gtag("config","G-68DEKWGBTM",{anonymize_ip:true});`}
        </Script>
        {children}
      </body>
    </html>
  );
}
