import type { MenuItem } from '../../../shared/types/menu-item'; import type { WidgetProps } from '../components/widget/types'; import type { WidgetHeaderConfig } from '../shared/widget-header/types'; /** * Inserts a built-in menu item after the existing built-in items and before any custom (user-provided) * ones, so built-ins always lead the menu regardless of the order features contribute them. * * Built-ins are recognized by their reserved ids ({@link WidgetHeaderMenuTargets}), which is what * makes the boundary between built-in and custom items computable from a single flat list. * * @param items - The current menu items. * @param builtInItem - The built-in menu item to insert. * @returns A new list with the built-in item placed at the end of the built-in block. * @internal */ export declare function withBuiltInMenuItem(items: readonly MenuItem[], builtInItem: MenuItem): MenuItem[]; /** * Transformer: adds a built-in menu item to a header config (pure, non-mutating). * * @param menuItem - The built-in menu item to add to menu.items. * @returns A transformer that maps WidgetHeaderConfig to WidgetHeaderConfig with the menu item added. * @internal */ export declare function withMenuItemInHeaderConfig(menuItem: MenuItem): (headerConfig: WidgetHeaderConfig) => WidgetHeaderConfig; /** * Adds a built-in menu item to the widget header (transforms full WidgetProps). * * @param menuItem - The built-in menu item to add. * @returns A transformer that maps WidgetProps to WidgetProps with the item in config.header.menu.items. * @internal */ export declare function withHeaderMenuItem(menuItem: MenuItem): (widget: WidgetProps) => WidgetProps;