import { ReactNode } from 'react'; import { Link } from 'react-router-dom'; import { ArrowLeft, type LucideIcon } from 'lucide-react'; import { Breadcrumbs } from '../ui/Breadcrumbs'; interface PageHeaderProps { title: string; description?: string; icon?: LucideIcon; iconColor?: string; backLink?: string; backLabel?: string; actions?: ReactNode; showBreadcrumbs?: boolean; className?: string; } /** * Consistent page header component with title, description, breadcrumbs, and actions */ export function PageHeader({ title, description, icon: Icon, iconColor = 'text-[var(--color-primary)]', backLink, backLabel = 'Back', actions, showBreadcrumbs = true, className = '' }: PageHeaderProps) { return (
{/* Breadcrumbs */} {showBreadcrumbs && } {/* Back Link */} {backLink && ( {backLabel} )} {/* Title Row */}
{Icon && (
)}

{title}

{description && (

{description}

)}
{/* Actions */} {actions && (
{actions}
)}
); } /** * Common action button styles for PageHeader */ export function PageHeaderButton({ children, variant = 'primary', onClick, disabled, className = '' }: { children: ReactNode; variant?: 'primary' | 'secondary' | 'ghost'; onClick?: () => void; disabled?: boolean; className?: string; }) { const variants = { primary: 'bg-[var(--color-primary)] hover:bg-[var(--color-primary-hover)] text-white shadow-sm', secondary: 'bg-[var(--color-bg-tertiary)] hover:bg-slate-200 dark:hover:bg-slate-600 text-[var(--color-text-primary)]', ghost: 'hover:bg-slate-100 dark:hover:bg-slate-700 text-[var(--color-text-secondary)]' }; return ( ); }