"use client"

import { AuthGuard } from "@/components/auth-guard"
import { DashboardSidebar } from "@/components/dashboard-sidebar"
import { Header } from "@/components/header"
import { RoleGuard } from "@/components/role-guard"

export default function DashboardLayout({ children }: { children: React.ReactNode }) {
  return (
    <div className="flex min-h-screen flex-col">
      <Header />
      <div className="container mx-auto flex flex-1 px-4">
        <div className="hidden md:block">
          <DashboardSidebar />
        </div>
        <main className="flex-1 p-6">
          <AuthGuard>
            <RoleGuard>{children}</RoleGuard>
          </AuthGuard>
        </main>
      </div>
    </div>
  )
}
