import { type IUiMenuContentItem, type IUiMenuFocusableItem, type IUiMenuInteractiveItem, type IUiMenuItem, type IUiMenuItemData } from "./types.js"; /** * Normalizes menu items on every level: collapses dangling separators and drops * interactive or group items whose submenu normalizes to empty, so no item renders * as an entry point to nothing. * @internal */ export declare const normalizeMenuItems: (items: IUiMenuItem[]) => IUiMenuItem[]; /** * Drops separators that would render dangling: at the start or end of the list, or directly * after another separator. Lets callers place separators between groups unconditionally, even * when a whole group is filtered out. * * @internal */ export declare function collapseSeparators(items: T[]): T[]; /** * Recursively finds an item in the menu tree that matches the predicate. * @internal */ export declare const findItem: (items: IUiMenuItem[], predicate: (item: IUiMenuItem) => boolean) => IUiMenuItem | undefined; /** * Gets a menu item by its ID. * @internal */ export declare const getItem: (items: IUiMenuItem[], itemId: string) => IUiMenuItem | undefined; /** * Finds an interactive menu item that matches the predicate. * @internal */ export declare const findInteractiveItem: (items: IUiMenuItem[], predicate: (item: IUiMenuInteractiveItem) => boolean) => IUiMenuInteractiveItem | undefined; /** * Finds a content menu item that matches the predicate. * @internal */ export declare const findContentItem: (items: IUiMenuItem[], predicate: (item: IUiMenuContentItem) => boolean) => IUiMenuContentItem | undefined; /** * Gets an interactive menu item by its ID. * @internal */ export declare const getInteractiveItem: (items: IUiMenuItem[], itemId: string) => IUiMenuInteractiveItem | undefined; /** * Gets a content menu item by its ID. * @internal */ export declare const getContentItem: (items: IUiMenuItem[], itemId: string) => IUiMenuContentItem | undefined; /** * Gets a focusable (either interactive or content) menu item by its ID. * @internal */ export declare const getFocusableItem: (items: IUiMenuItem[], itemId: string) => IUiMenuFocusableItem | undefined; /** * Gets all items under a specific interactive parent item. * @internal */ export declare const getItemsByInteractiveParent: (items: IUiMenuItem[], parentId?: string) => IUiMenuItem[] | undefined; /** * Gets the interactive parent of a menu item. * @internal */ export declare const getItemInteractiveParent: (items: IUiMenuItem[], itemId: string) => IUiMenuInteractiveItem | undefined; /** * Gets all sibling items of a menu item. * @internal */ export declare const getSiblingItems: (items: IUiMenuItem[], itemId: string) => IUiMenuItem[] | undefined; /** * Gets all next sibling items of a menu item with wraparound. * @internal */ export declare const getNextSiblings: (items: IUiMenuItem[], itemId: string) => IUiMenuItem[]; /** * Gets all previous sibling items of a menu item with wraparound. * @internal */ export declare const getPreviousSiblings: (items: IUiMenuItem[], itemId: string) => IUiMenuItem[]; /** * Gets the closest focusable sibling item in the specified direction. * @internal */ export declare const getClosestFocusableSibling: (args: { items: IUiMenuItem[]; isItemFocusable: (item: IUiMenuItem) => boolean; itemId?: string; direction: "forward" | "backward"; }) => IUiMenuItem | undefined; /** * Unwraps items from group containers into a flat array. * @internal */ export declare function unwrapGroupItems(items: IUiMenuItem[]): IUiMenuItem[]; //# sourceMappingURL=itemUtils.d.ts.map