// EN: Type definitions for documentation navigation
// VI: Định nghĩa types cho documentation navigation
export type { DocsLocale, NavItem as DocsNavItem, NavGroup as DocsNavGroup } from '@/lib/docs-types';


// EN: Dynamic navigation generation
// VI: Tạo navigation động
import { generateDocsNavigation } from '@/lib/docs-generator';

// EN: Cache navigation to avoid regenerating on every request
// VI: Cache navigation để tránh tạo lại với mỗi request
let cachedNavigation: DocsNavGroup[] | null = null;

export function getDocsNavigation(): DocsNavGroup[] {
    if (!cachedNavigation) {
        cachedNavigation = generateDocsNavigation();
    }
    return cachedNavigation;
}

// EN: Export cached navigation for backwards compatibility
// VI: Export cached navigation cho tương thích ngược
export const docsNavigation = getDocsNavigation();



