"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { Sidebar } from "./Sidebar";
import { TopNavbar } from "./TopNavbar";
import { MobileTopBar } from "../mobile/MobileTopBar";
import { MobileBottomNav } from "../mobile/MobileBottomNav";
import { SidebarProvider, useSidebar } from "../../../contexts/sidebar-context";
import { cn } from "../../../lib/utils";
function DashboardShellContent({ children, entities }) {
  const { isCollapsed } = useSidebar();
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen", children: [
    /* @__PURE__ */ jsx(Sidebar, { className: "hidden lg:flex", entities }),
    /* @__PURE__ */ jsx(TopNavbar, { className: "hidden lg:flex", entities }),
    /* @__PURE__ */ jsx(MobileTopBar, {}),
    /* @__PURE__ */ jsx(MobileBottomNav, {}),
    /* @__PURE__ */ jsx(
      "div",
      {
        className: cn(
          "transition-all duration-300 min-h-screen",
          // Mobile: padding for top bar and bottom nav
          "pt-14 pb-20",
          // Desktop: padding for top navbar and margin for sidebar
          "lg:pt-16 lg:pb-0 lg:ml-64",
          // Desktop collapsed sidebar
          isCollapsed && "lg:ml-16"
        ),
        children: /* @__PURE__ */ jsx("main", { className: "flex-1", children })
      }
    )
  ] });
}
function DashboardShell({ children, entities }) {
  return /* @__PURE__ */ jsx(SidebarProvider, { children: /* @__PURE__ */ jsx(DashboardShellContent, { entities, children }) });
}
export {
  DashboardShell
};
