import type { ReactNode } from "react";

import { MobileNav } from "@/components/dashboard/mobile-nav";
import { DashboardSidebar } from "@/components/dashboard/sidebar";
import { DashboardTopbar } from "@/components/dashboard/topbar";
import { AuthGuard } from "@/components/auth/auth-guard";

export default function DashboardLayout({ children }: { children: ReactNode }) {
  return (
    <AuthGuard>
      <div className="mx-auto flex max-w-[1500px] gap-4 p-4">
        <DashboardSidebar />
        <main className="min-h-screen flex-1">
          <DashboardTopbar />
          <MobileNav />
          {children}
        </main>
      </div>
    </AuthGuard>
  );
}
