import { AppSidebar } from "@/components/Layouts/AppSidebar"
import { Header } from "@/components/Layouts/Header"
import { Breadcrumbs } from "@/components/Layouts/Breadcrumbs"
import { Toaster } from "@/components/ui/toast"
import { AuthProvider } from "@/components/auth/AuthProvider"

export default function DashboardLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <AuthProvider>
      <div className="flex h-screen overflow-hidden bg-background">
        <AppSidebar />
        <main className="flex min-w-0 flex-1 flex-col">
          <Header />
          <div className="min-w-0 flex-1 overflow-auto">
            <div className="min-w-0 px-6 pt-3 pb-6 lg:px-8 lg:pt-4 lg:pb-8">
              <Breadcrumbs />
              <div className="rounded-xl bg-card border border-border shadow-sm">
                <div className="p-6">
                  {children}
                </div>
              </div>
            </div>
          </div>
        </main>
        <Toaster />
      </div>
    </AuthProvider>
  )
}
