"use client";
import "@fortawesome/fontawesome-free/css/all.min.css";
import "@/styles/style.css";
import Header from "@/components/Header";
import Footer from "@/components/Footer";
import Head from "next/head";

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  const handleBodyClick = () => {
    const menu = document.getElementById("menu_product");
    menu?.classList.remove("active");
  };

  return (
    <html lang="vi">
      <Head>
        <meta charSet="utf-8" />
        <meta
          name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1"
        />
        <meta httpEquiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Hurasoft</title>
        <link rel="icon" href="/image/favicon.png" />
      </Head>
      <body className="bg-white">
        <Header />
        <main onClick={handleBodyClick}>{children}</main>
        <Footer />
      </body>
    </html>
  );
}
