import React from 'react';
import uPlot from 'uplot';
import { TimeScale } from './scaleTime';
import type { SeriesInfo } from '../renderers/types';
import { VizTheme } from '../theme';
import type { GenericDataSet, MarkAnnotation, NamedFormatters, NumberedFormatters, ScaleConfig, SeriesConfig, TickInterval } from '../types';
import { LocaleInfo } from './formatTimestamp';
export declare const SECOND_TO_MICROSECOND = 1000000;
export declare const SECOND_TO_MILLISECOND = 1000;
export declare const DAY: number;
export declare function exists<T>(value: T | undefined | null): value is T;
export declare function isNumber(num: number | null | undefined): num is number;
type AnyFunction = (...args: any) => any;
/**
 * Creates a stable callback for a possibly dynamic callback.
 * Solution from: https://github.com/facebook/react/issues/16956#issuecomment-536636418
 */
export declare function useDynamicCallback(callback?: AnyFunction): AnyFunction | undefined;
export declare function useCreateAttachedDivElement(attachTo: HTMLElement | undefined, className: string): HTMLElement;
/**
 * Logs out the properties that change between render cycles. Answers the
 * "what value - if anything - caused this render to occur"
 *
 * @param name
 * @param props
 */
export declare const useWhyDidYouUpdate: <T extends Record<string, unknown>>(name: string, props: T) => void;
/**
 * Returns the fully formed SeriesConfig for the given field. Merges the `seriesConfig`
 * properties from the associated `ScaleConfig`, and the explictly defined `SeriesConfig`.
 */
export declare function getMergedSeriesConfigForField(seriesConfigMap?: SeriesConfig, scaleConfigMap?: ScaleConfig, field?: string): SeriesConfig[keyof SeriesConfig];
/** Create merged config for every defined series */
export declare function getMergedSeriesConfig(seriesConfigMap?: SeriesConfig, scaleConfigMap?: ScaleConfig): SeriesConfig;
export declare const formatKibBytes: (bytes: number, decimals?: number) => string;
export declare const valueFormatters: NumberedFormatters;
export declare const namedFormatters: NamedFormatters;
export declare const scaleNamedFormatters: NamedFormatters;
export declare const getXAxisResolution: (data: GenericDataSet) => number;
export declare const formatValueWithSeriesConfig: (value: number, seriesConfig: SeriesConfig[string], data: GenericDataSet) => React.ReactNode;
export declare const formatValueForPlottingWithSeriesConfig: (value: number, seriesConfig: SeriesConfig[string], data: GenericDataSet) => React.ReactNode;
export declare const formatValueWithScaleConfig: (value: number, scaleConfig: ScaleConfig[string], xAxisResolution: number) => string;
export declare const findClosest: (arr: number[], target: number) => number | null;
export declare const buildColorFunction: (maxDensity: number, theme: VizTheme) => ((value: number) => string);
export declare const timeTickFormatter: (tickValue: number, startingScale: TimeScale, decimalPlaces?: number) => string;
export declare const filterSplit: (index: number, split: number, splitsPos: number[], u: uPlot) => number | null;
export declare const roundToPoT: (value: number, roundFunc: (n: number) => number) => number;
export declare const pixelStrToNum: (str: string) => number;
export declare const X_AXIS_TIME_OPTIONS: {
    None: number;
    '1Min': number;
    '1Hour': number;
    '2Hours': number;
    '6Hours': number;
    '12Hours': number;
    '1Day': number;
    '2Days': number;
    '8Days': number;
};
export declare const markPrefix = "mark-";
export declare const buildSeriesForLegend: (series: SeriesInfo[], reversedOrder?: boolean, marks?: MarkAnnotation[]) => SeriesInfo[];
export declare const getTickInterval: (tickDiff: number) => TickInterval;
export declare const getDefaultExpandedFormatTimeStampLabelParts: (millisecondsEpoch: number, tickInterval: TickInterval, locale: LocaleInfo) => {
    time: string;
    day: string;
    month: string;
    year: string;
};
export {};
