UNPKG

@redocly/theme

Version:

Shared UI components lib

11 lines (10 loc) 945 B
import type { ResolvedNavItem, Version } from '@redocly/config'; import type { Location } from 'react-router-dom'; import { type Locale, type TFunction } from '../types/l10n'; import { type ItemState } from '../types/sidebar'; import { MenuItemType } from '../constants/common'; export declare const mapNavbarItems: (items: ResolvedNavItem[], defaultLocale: string, currentLocale: string, locales: Locale[], location: Location) => ItemState[]; export declare const isItemActive: (item: ResolvedNavItem, defaultLocale: string, currentLocale: string, locales: Locale[], location: Location) => boolean; export declare const buildLanguagesGroup: (locales: Locale[], defaultLocale: string, currentLocale: string) => ResolvedNavItem | undefined; export declare const buildVersionSection: (translate: TFunction, versions: Version[], activeVersion?: Version) => ResolvedNavItem[]; export declare function getMenuItemType(item: ItemState): MenuItemType;