UNPKG

918 BTypeScriptView Raw
1import type { ILocalesConfig, IRouteMeta, ISidebarGroup } from './types';
2export declare const getLocaleClearPath: (routePath: string, locale: ILocalesConfig[0]) => string;
3/**
4 * get parent path from route path
5 */
6export declare function getRouteParentPath(path: string, { meta, is2LevelNav, locale, }: {
7 meta?: IRouteMeta;
8 is2LevelNav: boolean;
9 locale: ILocalesConfig[0];
10}): string;
11/**
12 * hook for get sidebar data for all nav
13 */
14export declare const useFullSidebarData: () => Record<string, ISidebarGroup[]>;
15interface ITreeSidebarLeaf {
16 path: string;
17 title: string;
18 order: number;
19 children: (ITreeSidebarLeaf | ISidebarGroup)[];
20}
21/**
22 * hook for get full sidebar data in tree structure
23 */
24export declare const useTreeSidebarData: () => ITreeSidebarLeaf[];
25/**
26 * hook for get sidebar data for current nav
27 */
28export declare const useSidebarData: () => ISidebarGroup[];
29export {};