import LayoutProvider from "@/providers/layout.provider";
import LayoutContentProvider from "@/providers/content.provider";
import DashCodeSidebar from "@/components/partials/sidebar";
import DashCodeFooter from "@/components/partials/footer";
import ThemeCustomize from "@/components/partials/customizer";
import DashCodeHeader from "@/components/partials/header";
import MountedProvider from "@/providers/mounted.provider";

const layout = async ({ children }: { children: React.ReactNode }) => {
  return (
    <MountedProvider isProtected={true}>
      <LayoutProvider>
        <ThemeCustomize />
        <DashCodeHeader />
        <DashCodeSidebar />
        <LayoutContentProvider>{children}</LayoutContentProvider>
        <DashCodeFooter />
      </LayoutProvider>
    </MountedProvider>
  );
};

export default layout;
