import type { ReactNode } from 'react';

export type NotificationKind = 'info' | 'success' | 'warning' | 'danger' | 'mention';

export interface NotificationItem {
  id: string;
  /** Headline rendered bold. */
  title: string;
  /** Optional body — supports plain text or arbitrary nodes. */
  body?: ReactNode;
  /** Visual variant. Default 'info'. */
  kind?: NotificationKind;
  /** ISO timestamp or Date — drives the relative-time label. */
  createdAt?: string | Date;
  /** Click target — when provided, the item becomes a button. */
  href?: string;
  /** Optional avatar / icon. */
  icon?: ReactNode;
  /** Read state. Drives the unread dot + count badge. */
  read?: boolean;
  /** Optional action buttons rendered at the bottom of the item. */
  actions?: Array<{ id: string; label: string; onSelect?: () => void }>;
}

export type BannerKind = 'info' | 'success' | 'warning' | 'danger' | 'announcement';

export interface BannerItem {
  id: string;
  kind?: BannerKind;
  /** Required title. */
  title: ReactNode;
  /** Optional body. */
  body?: ReactNode;
  /** Optional CTA. */
  cta?: { label: string; href?: string; onSelect?: () => void };
  /** Dismissible by user. Default true. */
  dismissible?: boolean;
}
