import type { ReactNode } from "react"; import "@shared/components/SectionHeader.css"; export interface SectionHeaderProps { /** Uppercase eyebrow title. */ title: ReactNode; /** Optional right-aligned tally/count. */ count?: ReactNode; /** Render as a button with a disclosure chevron. */ collapsible?: boolean; /** When collapsible, whether the section is expanded. */ expanded?: boolean; onToggle?: () => void; className?: string; } /** * An uppercase section eyebrow with an optional trailing count and, when * `collapsible`, a disclosure chevron + toggle. Use above a group of rows/cards. */ export function SectionHeader({ title, count, collapsible, expanded = true, onToggle, className, }: SectionHeaderProps) { const classes = ["sui-sectionhdr", className ?? ""].filter(Boolean).join(" "); const inner = ( <> {title} {count != null && {count}} {collapsible && ( )} > ); return collapsible ? ( ) : (