"use client"; import { useMemo } from "react"; import { useAdminAuth } from "@/app/lib/AdminAuthContext"; import { sidebarFromAclMenu, type SidebarLink } from "@/app/lib/aclSidebar"; /** * Sidebar entries derived from the signed-in user's live aclMenu (via * AdminAuthContext). Task 6 wires this directly into the sidebar shell * component in place of the static src/components/app/nav-config.ts list. * Order and grouping follow the aclMenu tree (siblings by module id); */ export function useAclSidebar(): SidebarLink[] { const { aclMenu } = useAdminAuth(); return useMemo(() => sidebarFromAclMenu(aclMenu), [aclMenu]); }