import type { WidgetTitleChangedEvent } from '../../../../../domains/widgets/change-events.js'; import { WidgetContainerStyleOptions } from '../../../../../types'; import { TitleEditorConfig, WidgetHeaderConfig } from '../types.js'; type WidgetHeaderTitleStyleOptions = WidgetContainerStyleOptions['header']; /** * Params for {@link useWidgetHeaderTitle}. */ export interface UseWidgetHeaderTitleParams { /** The widget title text. */ title?: string; /** Style options for the widget header. */ styleOptions?: WidgetHeaderTitleStyleOptions; /** Reports a committed rename as a `title/changed` event. */ onChange?: (event: WidgetTitleChangedEvent) => void; } /** * Props for {@link WidgetHeaderTitle}. */ interface WidgetHeaderTitleProps { /** The widget title text. */ title?: string; /** Style options for the widget header. */ styleOptions?: WidgetHeaderTitleStyleOptions; /** Inline title editor config (provided at runtime when renaming is enabled). */ titleEditor?: TitleEditorConfig; } /** * Renders the widget title as the content of the built-in title header item. * * Renders the title through the inline editor when renaming is enabled. */ export declare const WidgetHeaderTitle: ({ title, styleOptions, titleEditor }: WidgetHeaderTitleProps) => import("react/jsx-runtime").JSX.Element; /** * Adds a widget's title to its header, renamable in place when `config.header.title.editing` is on. * * Everything it produces travels through the header's own interfaces: the title arrives as a regular * (marked) entry of `config.header.items`, and renaming adds its "Rename widget" entry through the * menu config. The inline editor's wiring stays inside — the widget component never sees it, so there * is nothing to thread through `WidgetContainer`. * * A widget with no title (a text widget) simply doesn't call this. Where the title sits in the row, * and that it is the item which shrinks under pressure, are the header's business: the slot supplies * `fill`. * * @param headerConfig - The widget's header config so far. * @param params - The title text, header style options and the change handler renaming reports to. * @returns The header config carrying the title item and, when renaming is on, the rename menu entry. * @internal */ export declare const useWidgetHeaderTitle: (headerConfig: WidgetHeaderConfig | undefined, { title, styleOptions, onChange }: UseWidgetHeaderTitleParams) => WidgetHeaderConfig; export {};