/**
 * Common types shared across every chart component in the lib.
 *
 * Per ADR-0023 every `<lib-*-chart>` exposes the same minimum input
 * shape (caption, description, ariaLabel, colorScheme). Chart-
 * specific inputs (xKey, yKey, …) layer on top per component.
 */

import type { ColorScheme } from './palette';
export type { ColorScheme };

/**
 * Inputs every chart honours. Components extend this with their
 * own keys.
 */
export interface ChartBaseInputs<T> {
  /** Raw rows. The chart's own type-specific keys index into these. */
  readonly data: readonly T[];
  /** Visible caption + SVG `<title>`. ≤ ~80 chars reads cleanly. */
  readonly caption: string;
  /** SVG `<desc>` — full sentence describing what the chart shows. */
  readonly description: string;
  /** Outer `<figure>`'s aria-label. Often the same as `caption`. */
  readonly ariaLabel: string;
  /** Optional palette family. `categorical` when no explicit value. */
  readonly colorScheme?: ColorScheme;
}
