@redocly/theme
Version:
Shared UI components lib
10 lines (9 loc) • 914 B
TypeScript
import type { ResolvedNavItem, Version } from '@redocly/config';
import type { Location } from 'react-router-dom';
import { type Locale, type TFunction, type ItemState } from '../../core/types';
import { MenuItemType } from '../../core/constants';
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;