import type { Metadata } from "next";
import "./globals.scss";
import "./App.scss";
// import "@/shared/fonts/fonts.scss";
import { Providers } from "./Providers";
import Navbar from "@/widgets/Navbar/Navbar";
import Footer from "@/widgets/Footer/Footer";

const googleAnalyticsHtml = `
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-0BMJ2KN7F8"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-0BMJ2KN7F8');
</script>
`

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <head dangerouslySetInnerHTML={{ __html: googleAnalyticsHtml }} />
      <body>
        <Providers>
          <Navbar />
          <div className="app">{children}</div>
          <Footer />
        </Providers>
      </body>
    </html>
  );
}
