'use client'; import { useEffect, type ReactNode } from 'react'; import { usePageHeader } from './PageHeaderContext'; interface SetPageHeaderProps { title: string; subtitle?: string; crumbs?: string[]; actions?: ReactNode; } /** * Call inside a page component to set the TopBar's title/subtitle/crumbs. * Renders a visually-hidden heading for accessibility and tests. */ export function SetPageHeader({ title, subtitle, crumbs, actions }: SetPageHeaderProps) { const { setHeader } = usePageHeader(); useEffect(() => { setHeader({ title, subtitle, crumbs, actions }); // eslint-disable-next-line react-hooks/exhaustive-deps }, [title, subtitle, crumbs?.join(',')]); return (

{title}

); }