import { ChartDataPoint, ChartConfig } from '../types/chart.types';
/**
 * Validation errors that can occur in chart components
 */
export interface ChartValidationError {
    type: 'data' | 'config' | 'props' | 'calculation';
    message: string;
    field?: string;
}
/**
 * Result of chart validation
 */
export interface ChartValidationResult {
    isValid: boolean;
    errors: ChartValidationError[];
    warnings: ChartValidationError[];
}
/**
 * Safe math operations to prevent division by zero and other edge cases
 */
export declare class SafeMath {
    /**
     * Safe division that returns 0 when dividing by zero
     */
    static divide(numerator: number, denominator: number, fallback?: number): number;
    /**
     * Safe percentage calculation
     */
    static percentage(value: number, total: number, fallback?: number): number;
    /**
     * Safe Math.max that handles empty arrays
     */
    static max(values: number[], fallback?: number): number;
    /**
     * Safe Math.min that handles empty arrays
     */
    static min(values: number[], fallback?: number): number;
    /**
     * Safe scale calculation for chart positioning
     */
    static scale(value: number, min: number, max: number, targetMin?: number, targetMax?: number): number;
    /**
     * Clamp a value between min and max
     */
    static clamp(value: number, min: number, max: number): number;
}
/**
 * Validates chart data array
 */
export declare function validateChartData(data: unknown): ChartValidationResult;
/**
 * Validates chart configuration
 */
export declare function validateChartConfig(config: unknown): ChartValidationResult;
/**
 * Validates that data and config are compatible
 */
export declare function validateDataConfigCompatibility(data: ChartDataPoint[], config: ChartConfig): ChartValidationResult;
/**
 * Sanitizes chart data by removing invalid entries and normalizing values
 */
export declare function sanitizeChartData(data: ChartDataPoint[]): ChartDataPoint[];
/**
 * Calculates safe min/max values for chart scales using nice tick boundaries.
 */
export declare function calculateSafeScaleRange(data: ChartDataPoint[], config: ChartConfig, options?: {
    minValue?: number;
    maxValue?: number;
    includeZero?: boolean;
    padding?: number;
    symmetric?: boolean;
}): {
    min: number;
    max: number;
    hasValidData: boolean;
};
/**
 * Heckbert's "nice numbers" algorithm.
 * Returns a "nice" number approximately equal to x.
 * When round=true, rounds to nearest nice number; when false, ceiling.
 * Nice numbers are from the {1, 2, 5} × 10^n sequence.
 */
export declare function niceNum(x: number, round?: boolean): number;
/**
 * Generate uniformly-spaced "nice" tick values for a given data range.
 * Uses Heckbert's algorithm to produce ticks from the {1,2,5}×10^n sequence.
 * Zero naturally falls on the grid when the range spans zero — no injection needed.
 */
export declare function generateNiceTicks(dataMin: number, dataMax: number, desiredTickCount?: number): {
    ticks: number[];
    niceMin: number;
    niceMax: number;
    step: number;
};
/**
 * Comprehensive chart validation that combines all checks
 */
export declare function validateChart(data: unknown, config: unknown): ChartValidationResult;
