import { Box, Breadcrumbs, Typography } from '@mui/material' import type { SxProps, Theme } from '@mui/material' import type { ReactNode } from 'react' import { NavLink } from 'react-router' interface BreadcrumbItem { label: string href?: string } interface PageHeaderProps { title: string subtitle?: string breadcrumbs?: BreadcrumbItem[] primaryAction?: ReactNode secondaryActions?: ReactNode badge?: ReactNode sx?: SxProps } export function PageHeader({ title, subtitle, breadcrumbs, primaryAction, secondaryActions, badge, sx, }: PageHeaderProps) { return ( {breadcrumbs && breadcrumbs.length > 0 && ( {breadcrumbs.map((crumb) => crumb.href ? ( {crumb.label} ) : ( {crumb.label} ), )} )} {title} {badge} {subtitle && ( {subtitle} )} {(primaryAction ?? secondaryActions) && ( {secondaryActions} {primaryAction} )} ) }