import type { Metadata } from "next";
import { Suspense } from "react";
import { Great_Vibes, Plus_Jakarta_Sans, Sora } from "next/font/google";
import { ContactProvider } from "@/components/ContactProvider";
import { FloatingActions } from "@/components/FloatingActions";
import { HomeProvider } from "@/components/HomeProvider";
import "./globals.css";

const jakarta = Plus_Jakarta_Sans({
  variable: "--font-jakarta",
  subsets: ["latin"],
  weight: ["400", "500", "600", "700", "800"],
});

const sora = Sora({
  variable: "--font-sora",
  subsets: ["latin"],
  weight: ["500", "600", "700"],
});

const script = Great_Vibes({
  variable: "--font-script",
  subsets: ["latin"],
  weight: ["400"],
});

export const metadata: Metadata = {
  title: "VNSAILS — Vietnam Yachting & Cruises",
  description:
    "Book Ha Long Bay, Lan Ha Bay, and Bai Tu Long Bay cruises with best prices. Overnight tours, day trips, and package tours.",
};

export default function RootLayout({ children }: LayoutProps<"/">) {
  return (
    <html
      lang="en"
      className={`${jakarta.variable} ${sora.variable} ${script.variable} h-full antialiased`}
    >
      <body className="min-h-full flex flex-col font-sans">
        <ContactProvider>
          <HomeProvider>
            {children}
            <Suspense fallback={null}>
              <FloatingActions />
            </Suspense>
          </HomeProvider>
        </ContactProvider>
      </body>
    </html>
  );
}
