import { Toaster } from "sonner"

import Navbar from "@/components/layout/navbar"
import AppSidebar from "@/components/layout/sidebar"
import { SidebarProvider } from "@/components/ui/sidebar"

export default async function LayoutDashboard({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <SidebarProvider>
      <AppSidebar />
      <main className="w-full">
        <Navbar />
        <div className="flex-1 p-6">{children}</div>
      </main>
      <Toaster />
    </SidebarProvider>
  )
}
