import { ReactNode, Ref } from 'react'; import { DynamicToolbarAction } from '../../module/header-layout/planToolbarActions'; import { ToolbarLocale } from '../../module/header-layout/useTranslations'; export interface PageHeaderAction extends DynamicToolbarAction { /** Count badge on the action button (e.g. unread notifications). */ badgeCount?: number; } export interface PageHeaderProps { /** Page/object title — the route heading. PageHeader owns the heading element. */ title: string; /** Heading element. Default `h1` (one PageHeader per route). */ titleAs?: 'h1' | 'h2' | 'div'; /** Heading test id, emitted as both `data-test` and `data-testid`. */ titleDataTest?: string; /** Heading ref. For route-change focus pass `useRouteHeadingFocus(pathname)` * from a component that survives the host's route changes. */ titleRef?: Ref; /** Context line under the title (subtitle, progress bar, …). */ subtitle?: ReactNode; /** Slot rendered right after the title (status chip, saved-state, help button, …). */ status?: ReactNode; /** Leading navigation control. Never moves into overflow, never disappears. */ leading?: 'back' | 'menu'; onLeadingClick?: () => void; /** i18n label for the leading control; also its accessible name when icon-only. */ leadingLabel?: string; /** Custom leading node (e.g. an injected widget). Wins over `leading`; never overflows. */ leadingSlot?: ReactNode; /** Trailing actions, adaptive: labels collapse, low-priority actions overflow. */ actions?: PageHeaderAction[]; /** Search-mode slot: when `searchOpen`, replaces title and actions (nav stays). */ search?: ReactNode; searchOpen?: boolean; onSearchClose?: () => void; /** i18n label for the search-mode close button. */ searchCloseLabel?: string; /** Skeleton state — placeholder bars replace title and actions (nav stays). */ loading?: boolean; /** Stick to the top of the scroll container; compacts once scrolled (data-stuck). */ sticky?: boolean; locale?: ToolbarLocale; className?: string; dataTest?: string; } /** Maps a PageHeaderAction to the toolbar engine's action shape. Exported for tests. */ export declare const toToolbarAction: (action: PageHeaderAction) => DynamicToolbarAction; export declare function PageHeader({ title, titleAs: HeadingTag, titleDataTest, titleRef, subtitle, status, leading, onLeadingClick, leadingLabel, leadingSlot, actions, search, searchOpen, onSearchClose, searchCloseLabel, loading, sticky, locale, className, dataTest, }: PageHeaderProps): JSX.Element;