import { ReactNode } from 'react';
import { BaseComponentProps } from '../../types';
import { default as Highcharts } from 'highcharts';

/** Chart type (Highcharts series type) */
export type ChartGraphType = 'column' | 'line' | 'area' | 'areaspline' | 'bar' | 'pie' | 'scatter' | 'scatter3d' | 'heatmap' | 'treemap' | 'bubble' | 'packedbubble' | 'semidonut';
/** Single menu option for chart type selector */
export interface ChartTypeOption {
    label: string;
    value?: string;
    onClick?: (event: React.MouseEvent) => void;
}
/** Tooltip formatter context (simplified Highcharts tooltip context) */
export interface ChartTooltipFormatterContext {
    key?: string;
    y?: number;
    color?: string;
    point?: {
        x: number | string;
        y?: number;
        value?: number;
    };
    [key: string]: unknown;
}
/** Custom tooltip formatter function */
export type ChartTooltipFormatter = (context: ChartTooltipFormatterContext) => string;
/** Custom legend: React element, or function that receives chart instance */
export type ChartCustomLegend = ReactNode | ((chart: Highcharts.Chart | undefined) => ReactNode);
/**
 * Simple series item for Chart (when graphType is set on the chart, type is optional).
 * Use this in tests/stories; full Highcharts.SeriesOptionsType is also accepted.
 */
export interface ChartSeriesDataItem {
    name?: string;
    data: number[] | number[][] | {
        x: number;
        y: number;
        [key: string]: unknown;
    }[];
    type?: string;
    [key: string]: unknown;
}
/**
 * Chart component props.
 * Renders a Highcharts chart with optional header, download, expand, and chart-type selector.
 */
export interface ChartProps extends BaseComponentProps {
    /** Highcharts series type (column, line, pie, etc.) */
    graphType?: ChartGraphType;
    /** X-axis category labels */
    xAxisCategories?: string[];
    /** X-axis title */
    xAxisTitle?: string;
    /** Y-axis title (left) */
    yAxisTitle?: string;
    /** Y-axis title for right axis (enables dual axis) */
    yAxisTitleRight?: string;
    /** Series data or pre-built series config (simple { name, data } or full Highcharts series options) */
    seriesData?: Highcharts.SeriesOptionsType[] | ChartSeriesDataItem[];
    /** Chart title shown in header */
    graphTitle?: ReactNode;
    /** Stack columns when type is column */
    stackedColumn?: boolean;
    /** Enable 3D chart */
    is3D?: boolean;
    /** Show subtitle */
    showSubTitle?: boolean;
    /** Subtitle text */
    subtitleText?: string;
    /** Callback when download is clicked */
    onChartDownload?: (event: React.MouseEvent) => void;
    /** Content when showchart is false (e.g. table view) */
    fallbackContent?: ReactNode;
    /** Custom content for top-right of header */
    topRightOptions?: ReactNode;
    /** Show toggle table/chart button */
    showSwitchButton?: boolean;
    /** Show chart type dropdown */
    showChartTypeDropdown?: boolean;
    /** Show download button */
    showDownloadButton?: boolean;
    /** Options for chart type menu */
    chartTypesOptions?: ChartTypeOption[];
    /** Currently selected chart type (for menu) */
    selectedChart?: string;
    /** Additional Menu props for chart type dropdown */
    chartMenuProps?: Record<string, unknown>;
    /** Enable horizontal scroll for many categories */
    showScrollX?: boolean;
    /** Custom content for top-left of header (after title) */
    topLeftOptions?: ReactNode;
    /** Wrap chart in card container (shadow) */
    cardContainer?: boolean;
    /** Legend X position (pixels) */
    legendXPosition?: number | null;
    /** Legend Y position (pixels) */
    legendYPosition?: number | null;
    /** X-axis title Y position */
    xAxisTitlePositionY?: number | null;
    /** Custom tooltip formatter */
    customTooltipFormatter?: ChartTooltipFormatter | null;
    /** Shared tooltip across series */
    sharedTooltip?: boolean;
    /** When false, render fallbackContent instead of chart */
    showchart?: boolean;
    /** Setter for showchart (used with showSwitchButton) */
    setShowChart?: (show: boolean) => void;
    /** Plot options event handlers */
    plotOptionsEvents?: Record<string, unknown>;
    /** Custom system button(s) in header */
    customSystemButton?: ReactNode | null;
    /** Callback when chart is expanded/collapsed */
    handleChartExpand?: (expanded: boolean) => void;
    /** Chart margin bottom (space for legend) */
    chartMarginBottom?: number;
    /** Show header with title and actions */
    showHeader?: boolean;
    /** Chart height (CSS value or number) */
    height?: number | string | null;
    /** Chart width (CSS value or number) */
    width?: number | string | null;
    /** Show expand/fullscreen button */
    showExpandButton?: boolean;
    /** Custom legend (element or render function) */
    customLegend?: ChartCustomLegend | null;
    /** Inline style for custom legend container */
    customLegendStyle?: React.CSSProperties | null;
    /** Override chart options */
    chartOptions?: Highcharts.ChartOptions;
    /** Override title options */
    titleOptions?: Highcharts.TitleOptions;
    /** Override xAxis options */
    xAxisOptions?: Highcharts.XAxisOptions;
    /** Override yAxis options (applies to both axes) */
    yAxisOptions?: Highcharts.YAxisOptions;
    /** Override left yAxis only */
    yAxisLeftOptions?: Highcharts.YAxisOptions;
    /** Override right yAxis only */
    yAxisRightOptions?: Highcharts.YAxisOptions;
    /** Override zAxis (3D) */
    zAxisOptions?: Highcharts.ZAxisOptions;
    /** Override tooltip options */
    tooltipOptions?: Highcharts.TooltipOptions;
    /** Override plotOptions */
    plotOptionsOptions?: Highcharts.PlotOptions;
    /** Override subtitle options */
    subtitleOptions?: Highcharts.SubtitleOptions;
    /** Override credits options */
    creditsOptions?: Highcharts.CreditsOptions;
    /** Override legend options */
    legendOptions?: Highcharts.LegendOptions;
    /** Override colorAxis (heatmap, etc.) */
    colorAxisOptions?: Highcharts.ColorAxisOptions;
    /** Override series (replaces seriesData when set) */
    seriesOptions?: Highcharts.SeriesOptionsType[] | null;
    /** Additional Highcharts options merged last */
    additionalOptions?: Record<string, unknown>;
}
//# sourceMappingURL=Chart.types.d.ts.map