import type { ReactNode } from "react";

interface PageHeaderProps {
  title: string;
  subtitle?: ReactNode;
  /** Primary action slot, right-aligned. */
  actions?: ReactNode;
}

/** Standard page title block with an action slot. */
export function PageHeader({ title, subtitle, actions }: PageHeaderProps) {
  return (
    <div className="page__header">
      <div className="page__titles">
        <h1>{title}</h1>
        {subtitle && <div className="page__subtitle">{subtitle}</div>}
      </div>
      {actions && <div className="page__actions">{actions}</div>}
    </div>
  );
}
