"use client";

import {
  Sidebar,
  SidebarContent,
} from "@/components/ui/sidebar";
import { sidebarItems } from "@/navigation/sidebar/sidebar-items";

import { SidebarShell } from "@/components/sidebar/sidebar-shell";

import { NavMain } from "./nav-main";

type AppSidebarProps = React.ComponentProps<typeof Sidebar>;

/**
 * Dashboard/admin RBAC sidebar. Customer portal uses `@/components/sidebar/app-sidebar`
 * + `DashboardSidebarShell` instead.
 */
export function AppSidebar(props: AppSidebarProps) {
  return (
    <SidebarShell homeHref="/dashboard" {...props}>
      <SidebarContent>
        <NavMain items={sidebarItems} />
      </SidebarContent>
    </SidebarShell>
  );
}
