import { AppSidebar } from "@/components/app-sidebar"
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"
import { CommandPalette } from "@/components/command-palette"
import { DataSourceProvider } from "@/lib/data-source"
import { EvoBGPProvider } from "@/lib/evobgp-context"

export default function MainLayout({ children }: { children: React.ReactNode }) {
  return (
    <DataSourceProvider>
      <EvoBGPProvider>
        <SidebarProvider>
          <AppSidebar />
          <SidebarInset className="h-svh overflow-hidden">{children}</SidebarInset>
          <CommandPalette />
        </SidebarProvider>
      </EvoBGPProvider>
    </DataSourceProvider>
  )
}
