import type { Folder, Item, Node } from "fumadocs-core/page-tree"; import type { ReactNode } from "react"; export type SidebarSectionNode = Extract; export interface SidebarRootGroup { icon?: ReactNode; id: string; items: SidebarSectionNode[]; label?: ReactNode; } export declare const getSidebarItemBadge: (item: Item | undefined) => string | undefined; export declare const getSidebarBadgeTone: (label: string) => string; export declare const isExternalSidebarItem: (item: Item | undefined) => boolean; export declare const isExternalSidebarUrl: (url: string) => boolean; export declare const hasSeparateRootDisclosure: (node: SidebarSectionNode) => node is Folder; export declare const getSidebarNodeId: (node: Node, path: number[], scope?: string) => string; /** * Whether a sidebar row links to the current page. Folders without an index * page have no link item, and pages outside the tree (such as a root landing * page) have no active URL; neither case may count as current, otherwise every * index-less folder highlights and scrolls into view on those pages. */ export declare const isSidebarItemCurrent: (item: Item | undefined, activeUrl: string | undefined) => boolean; export declare const nodeContainsUrl: (node: Node, url: string) => boolean; export declare const findActiveRootSection: (nodes: Node[], activeUrl: string | undefined) => Folder | null; export declare const getSidebarSectionItems: (section: Folder | null) => Node[]; export declare const getSidebarRootGroups: (nodes: Node[]) => SidebarRootGroup[]; export declare const getInitialOpenFolderIds: (nodes: Node[], activeUrl: string | undefined, openFirstLevel?: boolean, scope?: string) => string[]; export declare const getDescendantFolderIds: (folder: Folder, folderPath: number[], scope?: string) => string[]; //# sourceMappingURL=sidebar-tree.d.ts.map