import AppHeader from "../../../src/components/app-layout/AppHeader"
import AppFooter from "../../../src/components/app-layout/AppFooter"
import type { PropsWithChildren } from "react";
import { AuthProvider } from "@/contexts/AuthProvider";
import { Toaster } from "sonner";
import DynamicFavicon from "@/components/DynamicFavicon";
import { ThemeProvider } from "next-themes";

export default function RootLayoutFrontend({ children }: PropsWithChildren) {
  return (
    <div className="flex flex-col min-h-screen">
      {/* <DynamicFavicon /> */}
      <AuthProvider>
        <ThemeProvider
          attribute="class"
          forcedTheme="light"
        >
          <AppHeader />
          <main className="flex-1">{children}</main>
          <AppFooter />
        </ThemeProvider>
      </AuthProvider>

      {/* <Toaster
        position="top-right"
        richColors
        closeButton
        duration={3000}
        visibleToasts={1}
        toastOptions={{
          className: "!z-[999999]",
          style: { zIndex: 999999 }
        }}
      /> */}
    </div>    
  );
}