import { ReactNode } from 'react';

interface PageHeaderProps {
  emoji: string;
  title: string;
  subtitle?: ReactNode;
  actions?: ReactNode;
  className?: string;
}

export function PageHeader({ emoji, title, subtitle, actions, className }: PageHeaderProps) {
  return (
    <div className={`mb-8 flex flex-col sm:flex-row sm:items-center justify-between gap-4 ${className ?? ''}`}>
      <div>
        <h1 className="flex items-center gap-3 text-3xl font-bold tracking-tight text-foreground">
          <span className="text-3xl leading-none">{emoji}</span>
          {title}
        </h1>
        {subtitle && <p className="mt-1.5 text-sm text-muted">{subtitle}</p>}
      </div>
      {actions && <div className="shrink-0">{actions}</div>}
    </div>
  );
}
