"use client";

import { usePathname } from "next/navigation";

import "./globals.css";

import Header from "@/components/layout/header";
import Footer from "@/components/layout/footer";

import { AuthProvider } from "@/context/AuthContext";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {

  const pathname = usePathname();

  const isHome = pathname === "/";

  return (
    <html lang="ar" dir="rtl">
      <body>

        <AuthProvider>

          <Header />

        <main
  className={
    isHome
      ? ""
      : `
        pt-[95px]
        lg:pt-[115px]
      `
  }
>
            {children}
          </main>

          <Footer />

        </AuthProvider>

      </body>
    </html>
  );
}