import { SessionProvider } from "next-auth/react";
import type { Metadata } from "next";
import { Plus_Jakarta_Sans, Outfit } from "next/font/google";
import "./globals.css";
import Navbar from "@/components/Navbar";
import CartSidebar from "@/components/CartSidebar";
import Footer from "@/components/Footer";
import { HideOnDashboards } from "@/components/HideOnDashboards";

const jakarta = Plus_Jakarta_Sans({ subsets: ["latin"], variable: "--font-sans" });
const outfit = Outfit({ subsets: ["latin"], variable: "--font-heading" });

export const metadata: Metadata = {
  title: "RIMA Academy | Premium Beauty & Management Courses",
  description: "RIMA Academy is a premium online learning platform offering masterclasses in beauty, business management, and marketing.",
  keywords: ["RIMA Academy", "beauty courses", "management courses", "online learning", "cursuri dermopigmentare", "cursuri beauty"],
  authors: [{ name: "RIMA Academy" }],
  openGraph: {
    title: "RIMA Academy | Premium Beauty & Management Courses",
    description: "Discover top-tier courses in beauty and salon management.",
    url: "https://lms.rima-academy.com",
    siteName: "RIMA Academy",
    locale: "en_US",
    type: "website",
  },
  robots: {
    index: true,
    follow: true,
    googleBot: {
      index: true,
      follow: true,
      'max-video-preview': -1,
      'max-image-preview': 'large',
      'max-snippet': -1,
    },
  },
};

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <head>
      </head>
      <body className={`${jakarta.variable} ${outfit.variable} font-sans bg-[#050505] text-white selection:bg-white/20`}>
        <SessionProvider>
          <HideOnDashboards>
            <CartSidebar />
          </HideOnDashboards>
          <Navbar />
          <div className="pt-16 md:pt-20">
            {children}
          </div>
          <HideOnDashboards>
            <Footer />
          </HideOnDashboards>
        </SessionProvider>
      </body>
    </html>
  );
}
