/**
 * Waterfall chart type definitions
 * @countermeasure/web-components/charts/waterfall/types
 */

import type { InteractiveChartConfig, AxisConfig } from '../types'

export interface WaterfallItem {
  label: string
  value: number
  type?: 'increase' | 'decrease' | 'total'
}

export interface WaterfallChartConfig extends InteractiveChartConfig {
  /** Ordered sequence of waterfall steps. */
  items: WaterfallItem[]
  /** Optional X-axis configuration override. */
  xAxis?: AxisConfig
  /** Optional Y-axis configuration override. */
  yAxis?: AxisConfig
  /** Per-type color overrides for increase, decrease, and total bars. */
  colors?: {
    increase?: string
    decrease?: string
    total?: string
  }
  /**
   * Corner radius applied to each bar in pixels.
   * @default 0
   */
  barRadius?: number
  /**
   * Draw connector lines between adjacent bars.
   * @default true
   */
  showConnectors?: boolean
}
