import { Badge, Button } from "../../";

type BadgeVariant = React.ComponentProps<typeof Badge>["variant"];

export interface HeaderBadge {
  /** Text/content shown inside the badge */
  label: React.ReactNode;
  /** Optional leading icon */
  icon?: React.ReactNode;
  variant?: BadgeVariant;
  className?: string;
}

export interface HeaderMetaItem {
  /** Small muted label, e.g. "Owner" / "Sales Manager" */
  label: string;
  /** The value shown under the label */
  value: React.ReactNode;
  /** Icon rendered inside the boxed container on the left */
  icon?: React.ReactNode;
}

export interface HeaderAction {
  label: React.ReactNode;
  onClick?: () => void;
  icon?: React.ReactNode;
  variant?: React.ComponentProps<typeof Button>["variant"];
  disabled?: boolean;
}

export interface HeaderProps {
  title: React.ReactNode;
  subtitle?: React.ReactNode;
  /** Small icon shown before the subtitle (defaults to a building icon) */
  subtitleIcon?: React.ReactNode;

  /**
   * Leading visual. Priority: `avatar` node → `initials` gradient box →
   * `icon` → default building icon.
   */
  avatar?: React.ReactNode;
  /** Initials rendered inside a gradient avatar box, e.g. "FM" */
  initials?: string;
  icon?: React.ReactNode;

  /** Status / tag badges rendered inline next to the title */
  badges?: HeaderBadge[];

  /**
   * Right-side actions. Pass an array for convenience buttons, or a custom
   * node via `actionsSlot` for full control.
   */
  actions?: HeaderAction[];
  actionsSlot?: React.ReactNode;

  /** Lower meta section, e.g. Owner / Industry / Deal Value / Created */
  meta?: HeaderMetaItem[];

  /** Show the gradient accent bar at the top (default true) */
  accent?: boolean;
  className?: string;
}