/** * Sidebar / secondary-nav active-state helpers. * * Only one nav target should be "selected" at a time. Prefix matching * (`/dashboard` active on `/dashboard/students`) is correct only when no * more-specific nav href also matches the current pathname. */ declare function normalizePathname(pathname: string): string; /** Path segment before `#` (if any). */ declare function navUrlPath(url: string): string; /** Hash fragment after `#`, or `null` when the href has no fragment. */ declare function navUrlFragment(url: string): string | null; declare function normalizedLocationHash(locationHash: string): string; /** Path → hash fragments claimed by *another* nav item at the same path. */ declare function buildNavHashClaims(urls: readonly string[]): ReadonlyMap>; /** * Longest matching nav path for `pathname` among `candidateUrls` (path + prefix rules). * Returns the winning href string, or `null`. */ declare function resolveActiveNavHref(pathname: string, candidateUrls: readonly string[], options?: { locationHash?: string; hashClaimsByPath?: ReadonlyMap>; }): string | null; /** True when `url` is the single best match for `pathname` among all nav hrefs. */ declare function isNavHrefActive(pathname: string, url: string, allNavUrls: readonly string[], options?: { locationHash?: string; hashClaimsByPath?: ReadonlyMap>; }): boolean; /** Collect every `url` from a nav tree (primary rows + children). */ declare function collectNavUrls(items: ReadonlyArray<{ url?: string; children?: ReadonlyArray<{ url?: string; children?: unknown; }>; }>): string[]; export { buildNavHashClaims, collectNavUrls, isNavHrefActive, navUrlFragment, navUrlPath, normalizePathname, normalizedLocationHash, resolveActiveNavHref };