import { type ElementType, type ReactElement, type ReactNode } from "react"; import type { NavTree } from "../../docs/types.js"; /** * Props for {@link DocsSidebar}. */ export interface DocsSidebarProps { /** The navigation tree for the current language (from `docs.getNavTree(lang)`). */ nav: NavTree; /** * The current page's URL path (e.g. from Next's `usePathname()`), matched against each item's * `href` to highlight the active page and pick which tab's groups to show. Omit on a page with no * active item (e.g. the index), where the first tab is shown. */ activePath?: string | undefined; /** The render language, used to localize the built-in nav label. */ lang?: string | undefined; /** Element used for nav links. Defaults to `"a"`; pass `next/link` for client-side nav. */ linkComponent?: ElementType; /** Accessible label for the `