"use client";

import { HeroUIProvider } from "@heroui/react";
import { ToastProvider } from "@heroui/toast";
import { AppProgressProvider as ProgressProvider } from "@bprogress/next";
import { Footer, Navbar } from "@/views/shared";

export function Providers({ children }: { children: React.ReactNode }) {
  return (
    <HeroUIProvider>
      <ProgressProvider
        height="4px"
        color="#041527"
        options={{ showSpinner: false }}
        shallowRouting
        startOnLoad={true}
      >
        <ToastProvider toastProps={{ timeout: 3000 }} placement="top-center" />
        <Navbar />
        <main className="max-w-full overflow-x-hidden overflow-y-clip">
          {children}
        </main>
        <Footer />
      </ProgressProvider>
    </HeroUIProvider>
  );
}
