import type { ChartKey, ResolvedColorScale } from './types.js';
export interface CategoricalLegendItem<TValue extends ChartKey = ChartKey> {
    key: string;
    value: TValue;
    label: string;
    color: string;
}
export interface CategoricalLegendLayout {
    columns: number;
    rows: number;
    itemWidth: number;
}
export declare function resolveCategoricalLegendItems<TValue extends ChartKey = ChartKey>(colors: ResolvedColorScale, format?: (value: TValue) => string): readonly CategoricalLegendItem<TValue>[];
export declare function layoutCategoricalLegendItems(itemCount: number, width: number, minimumItemWidth: number): CategoricalLegendLayout;
