// ============================================================================
// Workspace Dashboard Layout
// ============================================================================

import { AppSidebar } from "@/components/layout/app-sidebar";
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
import { ProtectedRoute } from "@/components/auth/protected-route";
import { WorkspaceProvider } from "@/components/providers/workspace-provider";
import { DashboardLayoutContent } from "@/components/layout/dashboard-layout-content";

export default function WorkspaceDashboardLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <ProtectedRoute>
      <WorkspaceProvider>
        <SidebarProvider>
          <AppSidebar />
          <SidebarInset>
            <DashboardLayoutContent>{children}</DashboardLayoutContent>
          </SidebarInset>
        </SidebarProvider>
      </WorkspaceProvider>
    </ProtectedRoute>
  );
}

