import UPlot, { Options, Series } from 'uplot';
import Yagr from '../../index';
export type LegendPosition = 'top' | 'bottom';
export interface LegendOptions {
    /** Show legend (default: false) */
    show?: boolean;
    /** Root classname */
    className?: string;
    /** Legend placement position */
    position?: LegendPosition;
    /** Maximal space fro legend as a fraction of chart height (default: 0.3) */
    maxLegendSpace?: number;
    /** @TODO Maybe bugs here  */
    fontSize?: number;
    /** Basic behaviour includes only toggle behaviuor ("Hide/show all" button exists) */
    behaviour?: 'basic' | 'extended';
}
interface LegendState {
    page: number;
    pages: number;
    paginated: boolean;
    rowsPerPage: number;
    pageSize: number;
    requiredSpace: number;
    totalSpace: number;
    startSerieRange?: UPlot.Series;
}
export declare const getSeriesInLegend: (series: Series[]) => UPlot.Series[];
export declare const hasOneVisibleLine: (series: Series[]) => boolean;
export default class LegendPlugin {
    yagr: Yagr;
    uplot?: UPlot;
    options: LegendOptions;
    pagesCount: number;
    state: LegendState;
    itemsHtml: string;
    legendEl?: HTMLElement;
    items?: HTMLElement;
    container?: HTMLElement;
    private _onDestroy?;
    redraw(): void;
    destroy(): void;
    preInit: (yagr: Yagr, options: LegendOptions, uplotOptions: Options) => void;
    init: (u: uPlot) => void;
    update: () => void;
    private applyHandlers;
    private render;
    private measureLegend;
    private nextPage;
    private prevPage;
    private renderPagination;
    private createIconLineElement;
    private createSerieNameElement;
    private renderItems;
    private calc;
    private get VERTICAL_PADDING();
}
export {};
