import type { HeaderItem } from '../../../domains/shared/header'; import type { WidgetProps } from '../components/widget/types'; import type { WidgetHeaderConfig, WidgetHeaderItemsTransform } from '../shared/widget-header/types'; /** * Transformer: appends items to a header config's `items` (pure, non-mutating). * * Features contribute their built-in items through the same public array users do; what lets them * claim a reserved {@link WidgetHeaderTargets} id is the `asBuiltInHeaderItem` marking on the item * itself, not a separate config channel. * * @param items - The items to append. * @returns A transformer that maps a WidgetHeaderConfig to one carrying the extra items. * @internal */ export declare function withHeaderItemsInConfig(items: readonly HeaderItem[]): (headerConfig: WidgetHeaderConfig) => WidgetHeaderConfig; /** * Adds items to a widget's `config.header.items` (transforms full WidgetProps). * * @param items - The items to append. * @returns A transformer that maps WidgetProps to WidgetProps carrying the extra items. * @internal */ export declare function withHeaderItems(items: readonly HeaderItem[]): (props: Readonly) => WidgetProps; /** * Transformer: adds an internal items transform to a header config, running it *after* the config's * own `onBeforeRender` (pure, non-mutating). * * Internal transforms run last on purpose: a feature that decorates built-in items (e.g. the * editable layout's drag handle) has to keep working on whatever list the consumer's * `onBeforeRender` produced, rather than being undone by it. * * @param transform - The items transform to add. * @returns A transformer that maps a WidgetHeaderConfig to one running `transform` last. * @internal */ export declare function withHeaderItemsTransformInConfig(transform: WidgetHeaderItemsTransform): (headerConfig: WidgetHeaderConfig) => WidgetHeaderConfig; /** * Adds an internal items transform to a widget's `config.header.onBeforeRender` (transforms full * WidgetProps). * * @param transform - The items transform to add. * @returns A transformer that maps WidgetProps to WidgetProps running `transform` last. * @internal */ export declare function withHeaderItemsTransform(transform: WidgetHeaderItemsTransform): (props: Readonly) => WidgetProps;