import { LegendProps as RechartsLegendProps } from 'recharts';
import { Formatter, LegendPayload as RechartsLegendPayload } from 'recharts/types/component/DefaultLegendContent';
export type LegendFormatter = Formatter;
export type LegendPayload = RechartsLegendPayload;
export type LegendPlacement = Partial<Pick<RechartsLegendProps, 'layout' | 'align' | 'verticalAlign' | 'width' | 'height'>>;
export type LegendContentArgs<T> = {
    items?: T[];
    iconSize: number;
    resolveColor: (entry: T, index: number) => string;
    placement?: LegendPlacement;
};
export type LegendPropsSeries = LegendPlacement & Omit<RechartsLegendProps, 'ref' | 'formatter' | 'content'> & {
    formatter?: (value: string | number, entry: LegendPayload, index: number) => React.ReactNode;
};
export type LegendPropsCustom<T = unknown> = LegendPlacement & Omit<RechartsLegendProps, 'ref' | 'formatter' | 'content'> & {
    items: T[];
    content: (args: LegendContentArgs<T>) => React.ReactNode;
};
export type LegendProps<T = unknown> = LegendPropsSeries | LegendPropsCustom<T>;
export declare const getLegendDefaultProps: () => {
    iconType: string;
    iconSize: number;
    layout: string;
    align: string;
    verticalAlign: string;
};
declare const Legend: <T>(_props: LegendProps<T>) => null;
export default Legend;
