/**
 * Treemap chart type definitions
 * @countermeasure/web-components/charts/treemap/types
 */

import type { BaseChartConfig, TooltipConfig } from '../types'

export interface TreemapNode {
  label: string
  value: number
  color?: string
  children?: TreemapNode[]
}

export interface TreemapChartConfig extends BaseChartConfig {
  /** Root node of the hierarchy. */
  data: TreemapNode
  /** Optional tooltip configuration (formatter, enabled flag). */
  tooltip?: TooltipConfig
  /**
   * Render labels inside each cell when there is room.
   * @default true
   */
  showLabels?: boolean
  /**
   * Gap between adjacent cells in pixels.
   * @default 2
   */
  cellGap?: number
  /**
   * Corner radius applied to each cell in pixels.
   * @default 2
   */
  cellRadius?: number
}
