import type { Version } from '@redocly/config'; type VersionedItem = { version?: string; isDefault?: boolean; versionFolderId?: string; link?: string; } & { [key in (typeof CHILDREN_KEYS)[number]]?: VersionedItem[]; }; declare const CHILDREN_KEYS: readonly ['items', 'menu']; /** * Filters the sidebar items based on the active version. * * The input is a list of all items with versioned items mixed in. * * We can't just filter out all items that don't match the active version because there might be items from folders that have different versions. * * For example: * * /foo * /@v1 * /@v2 * /bar * /@v1 * /@latest * * So we foolow these rules: * - only the active version's own folder follows the active version * - every other folder keeps its own default version, even if it happens to * contain a version with the same name as the active version * - if the active version name doesn't exist in its own folder, that folder * falls back to its default version */ export declare function filterOutVersionedItems(items: T[], activeVersion?: Version | null, versionNamesByFolderId?: Record>): T[]; export {}; //# sourceMappingURL=filter-out-versioned-items.d.ts.map