import { userAccess } from "../../lib/authClient";
import {
	Sidebar,
	SidebarContent,
	SidebarFooter,
	SidebarTrigger,
} from "../ui/sidebar";
import Admin from "./Admin";
import { Header } from "./Header";

export default function SideBarNav() {
	return (
		<div className="flex min-h-screen">
			<Sidebar collapsible="icon">
				<Header />
				<SidebarContent>
					{userAccess(null, ["systemAdmin", "admin"]) && <Admin />}
				</SidebarContent>

				<SidebarFooter>
					<SidebarTrigger />
				</SidebarFooter>
			</Sidebar>
		</div>
	);
}
