import type { MenuItem } from '../../pn-marketweb-siteheader/pn-marketweb-siteheader-types';
import type { HeaderMenuGroups, HeaderMenuMode, HeaderMenuStructure } from '../types/pn-marketweb-header.types';
/**
 * Header menu mode utilities.
 *
 * Purpose
 * -------
 * Interprets the backend top-level menu structure used for header menu
 * switching.
 *
 * Expected top-level order:
 * - all items except the last = switchable root menus
 * - last item = shared/common root
 *
 * Responsibilities
 * ----------------
 * - extract a structured representation of the switchable menu roots
 * - resolve the active root for a selected mode
 * - return grouped or flat visible items for rendering
 */
export declare function extractToggleableMenuStructure(menuItems: MenuItem[]): HeaderMenuStructure;
/**
 * Returns the active root item for the selected mode.
 *
 * Falls back to the first available mode root when the requested mode
 * is out of bounds.
 */
export declare function getToggleRootForMode(structure: HeaderMenuStructure, mode: HeaderMenuMode): MenuItem | null;
/**
 * Returns the active root item for the selected mode directly from raw menu items.
 */
export declare function getToggleRootForMenuItems(menuItems: MenuItem[], mode: HeaderMenuMode): MenuItem | null;
/**
 * Returns grouped visible items for rendering.
 *
 * - primaryItems = children of the active root
 * - sharedItems = children of the shared/common root
 */
export declare function getMenuGroupsForMode(structure: HeaderMenuStructure, mode: HeaderMenuMode): HeaderMenuGroups;
/**
 * Returns grouped visible items directly from raw menu items.
 */
export declare function getVisibleMenuGroupsForMode(menuItems: MenuItem[], mode: HeaderMenuMode): HeaderMenuGroups;
/**
 * Builds a flat list of visible menu items for the selected mode.
 *
 * Useful for render paths that do not need grouped rendering.
 */
export declare function buildMenuItemsForMode(structure: HeaderMenuStructure, mode: HeaderMenuMode): MenuItem[];
