import { AppSidebar } from "@/components/app-sidebar"
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"
import { CommandPalette } from "@/components/command-palette"
import { ReleaseNotesModal } from "@/components/release-notes-modal"
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 />
          <ReleaseNotesModal />
        </SidebarProvider>
      </EvoBGPProvider>
    </DataSourceProvider>
  )
}
