import type { LegendOptions, ChartTypeRegistry, ChartConfiguration, Chart } from 'chart.js';
import type { _DeepPartialObject } from 'chart.js/types/utils';
import type { ChartOptions } from './types';
export declare function buildLegend(options: ChartOptions): _DeepPartialObject<LegendOptions<keyof ChartTypeRegistry>>;
export declare function buildCustomLegend({ chart, options, chartConfig, }: {
    chart: Chart;
    options: ChartOptions;
    chartConfig: ChartConfiguration;
}): {
    type: "category";
    position: "bottom" | "left" | "right";
    items: {
        color: string | undefined;
        borderDashed: boolean;
        label: string;
        onClick: (index: number) => void;
        onHover: (index: number, isVisible?: boolean) => void;
        onLeave: () => void;
    }[];
};
