import React from 'react';
import { LocaleInfo } from '../utilities/formatTimestamp';
import { PlotDimensions } from '../TimeSeriesChart';
import { VizTheme } from '../theme';
import { AxisRange, GenericDataSet, ScaleConfig, SeriesConfig, TimestampFormat } from '../types';
export type PlotRendererFactoryOptions = {
    onReady?: (PlotUtilitiesFn: PlotUtilitiesFn, uplotref: uPlot | undefined) => void;
};
export type SeriesInfo = {
    field: string;
    label?: string;
    fill?: string;
    stroke?: string;
    show: boolean;
};
export type PlotUtilities = {
    dimensions: PlotDimensions;
    valToPos: (value: number, scaleKey: string) => number;
    posToVal: (position: number, scaleKey: string) => number;
    setCursor: (cursor: {
        left: number;
        top: number;
    }, fire?: boolean) => void;
    setFocusedSeries: (field: string | null) => void;
    allSeries: SeriesInfo[];
    el: HTMLElement;
};
export type PlotUtilitiesFn = () => PlotUtilities | undefined;
export type OnSetCursorFn = (cursor: {
    top: number;
    left: number;
    index: number;
} | null) => void;
export type OnFocusSeriesFn = (seriesIndex: number | null) => void;
export type RenderProps = {
    width: number;
    height: number;
    data: GenericDataSet;
    seriesConfig?: SeriesConfig;
    scaleConfig?: ScaleConfig;
    theme: VizTheme;
    interactiveEl?: HTMLElement;
    hideXAxis?: true;
    range?: AxisRange;
    hiddenSeries?: string[];
    userLocale?: LocaleInfo;
    /** Maximum number of series that still allows for "closest series focus" functionality to be enabled.
     * defaults to FOCUS_MAX_SERIES (30)
     */
    maxSeriesFocus?: number;
    rawXaxisValues?: (string | number | null)[];
    timestampFormat?: TimestampFormat;
};
export type PlotRenderer = {
    component: React.FC<RenderProps>;
    onSetCursor: (fn: OnSetCursorFn) => void;
    onFocusSeries: (fn: OnFocusSeriesFn) => void;
};
export type PlotRendererFactory = (options: PlotRendererFactoryOptions) => {
    utils: PlotUtilitiesFn;
    renderer: PlotRenderer;
};
