"use client";

import * as React from "react";

import { NavMain } from "@/components/admin/navigations/nav-main";
import { NavReports } from "@/components/admin/navigations/nav-report";
import { NavUser } from "@/components/admin/navigations/nav-user";


import {
  Sidebar,
  SidebarContent,
  SidebarFooter,
  SidebarHeader,
  SidebarRail,
} from "@/components/ui/sidebar";
import { NavPreMain } from "./navigations/nav-pre-main";
import { navData } from "@/prisma/data/nav";
import { TeamSwitcher } from "../team-switcher";

export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
  return (
    <Sidebar collapsible="icon" {...props}>
      <SidebarHeader>
        <TeamSwitcher teams={navData.teams} />
      </SidebarHeader>
      <SidebarContent>
        <NavPreMain items={navData.NavPreMain} />
        <NavMain items={navData.navMain} />
        <NavReports reports={navData.reports} />
      </SidebarContent>
      <SidebarFooter>
        <NavUser user={navData.user} />
      </SidebarFooter>
      <SidebarRail />
    </Sidebar>
  );
}
