import type { Metadata } from "next";
import { Manrope, Space_Grotesk } from "next/font/google";

import { SITE } from "@/lib/site";

import "./globals.css";

import Footer from "@/components/Footer";
import LenisProvider from "@/components/LenisProvider";
import Nav from "@/components/Nav";

const space = Space_Grotesk({
  variable: "--font-space",
  subsets: ["latin"],
  display: "swap",
});

const manrope = Manrope({
  variable: "--font-manrope",
  subsets: ["latin"],
  display: "swap",
});

export const metadata: Metadata = {
  title: {
    default: "GV Bumisinar Sdn Bhd",
    template: "%s | GV Bumisinar Sdn Bhd",
  },
  description: SITE.blurb,
  metadataBase: new URL("https://www.gvtec.com"),
  alternates: {
    canonical: "/",
  },
  openGraph: {
    title: "GV Bumisinar Sdn Bhd",
    description: SITE.blurb,
    siteName: "GV Bumisinar Sdn Bhd",
    type: "website",
  },
};

export default function RootLayout({ children }: LayoutProps<"/">) {
  return (
    <html
      lang="en"
      className={`${space.variable} ${manrope.variable} h-full antialiased`}
    >
      <body className="flex min-h-full flex-col">
        <LenisProvider>
          <Nav />
          <main className="flex-1">{children}</main>
          <Footer />
        </LenisProvider>
      </body>
    </html>
  );
}
