import { ReactNode } from 'react';
import { BaseChartProps, ChartConfig } from '../types/chart.types';
/**
 * Semantic color options for the heatmap
 */
export type SemanticColor = 'primary' | 'success' | 'warning' | 'danger';
/**
 * Heatmap data point structure
 * @property {string | number} x - X-axis category (e.g., day, month, hour)
 * @property {string | number} y - Y-axis category (e.g., week, year, metric)
 * @property {number | null} value - Numeric value for color intensity
 * @property {any} [key] - Additional data for tooltips
 */
export interface HeatmapDataPoint {
    x: string | number;
    y: string | number;
    value: number | null;
    [key: string]: unknown;
}
/**
 * Heatmap cell props
 */
export interface HeatmapCellProps {
    data: HeatmapDataPoint;
    intensity: number;
    minOpacity?: number;
    color?: string;
    className?: string;
    onClick?: (data: HeatmapDataPoint) => void;
    onHover?: (data: HeatmapDataPoint, event: React.MouseEvent) => void;
    onMouseMove?: (data: HeatmapDataPoint, event: React.MouseEvent) => void;
    onLeave?: () => void;
    children?: ReactNode;
}
/**
 * Color scale configuration
 */
export interface HeatmapColorScale {
    /** Custom color steps from light to dark */
    colors?: string[];
    /** Number of color steps (default: 10) */
    steps?: number;
    /** Minimum opacity for null/zero values */
    minOpacity?: number;
}
/**
 * Heatmap layout configuration
 */
export interface HeatmapLayout {
    /** Gap between cells */
    gap?: number | string;
}
/**
 * Heatmap axis configuration
 */
export interface HeatmapAxisConfig {
    /** Show X-axis labels */
    showXAxis?: boolean;
    /** Show Y-axis labels */
    showYAxis?: boolean;
    /** X-axis label formatter */
    xAxisFormatter?: (value: string | number, index: number) => string;
    /** Y-axis label formatter */
    yAxisFormatter?: (value: string | number, index: number) => string;
    /** X-axis label rotation */
    xAxisRotation?: number;
    /** Y-axis label rotation */
    yAxisRotation?: number;
}
/**
 * Heatmap tooltip configuration
 */
export interface HeatmapTooltipConfig {
    /** Show tooltip on hover */
    enabled?: boolean;
    /** Custom tooltip formatter */
    formatter?: (data: HeatmapDataPoint) => ReactNode;
    /** Tooltip delay in ms */
    delay?: number;
}
/**
 * Heatmap legend configuration
 */
export interface HeatmapLegendConfig {
    /** Show legend */
    enabled?: boolean;
    /** Custom labels for min and max values */
    labels?: {
        min?: string;
        max?: string;
    };
}
/**
 * Main Heatmap component props
 */
export interface HeatmapProps extends Omit<BaseChartProps, 'data' | 'config' | 'variant' | 'theme'> {
    /** Heatmap data array - optional when using ChartContainer context */
    data?: HeatmapDataPoint[];
    /** Chart configuration - optional when using ChartContainer context */
    config?: ChartConfig;
    /** Semantic color for heatmap cells (primary, success, warning, danger) */
    color?: SemanticColor;
    /** Color scale configuration */
    colorScale?: HeatmapColorScale;
    /** Layout configuration */
    layout?: HeatmapLayout;
    /** Axis configuration */
    axis?: HeatmapAxisConfig;
    /** Tooltip configuration */
    tooltip?: HeatmapTooltipConfig;
    /** Legend configuration */
    legend?: HeatmapLegendConfig;
    /** Custom value range [min, max] - if not provided, will be calculated from data */
    valueRange?: [number, number];
    /** Cell click handler */
    onCellClick?: (data: HeatmapDataPoint) => void;
    /** Custom cell renderer */
    cellRenderer?: (props: HeatmapCellProps) => ReactNode;
    /** Additional CSS classes */
    className?: string;
    /** Chart variant */
    variant?: 'default' | 'minimal' | 'bordered';
}
/**
 * Processed heatmap data with calculated values
 */
export interface ProcessedHeatmapData {
    data: HeatmapDataPoint[];
    xCategories: (string | number)[];
    yCategories: (string | number)[];
    valueRange: [number, number];
    maxValue: number;
    minValue: number;
}
