import type { Datum } from "./datumTypes";
import type { Accessor } from "./types";
import type { LegendPosition } from "./hooks";
/**
 * Hook that discovers categories from streamed (pushed) data and builds
 * a legend dynamically.
 *
 * When the `data` prop is provided (bounded mode), this hook is inert —
 * the legend is built by `useChartSetup` from the full dataset.
 *
 * When `data` is undefined (push API mode), this hook:
 * 1. Wraps push/pushMany to intercept incoming data
 * 2. Extracts category values via `colorBy`
 * 3. Builds a legend config when new categories are discovered
 *
 * Returns `wrapPush` / `wrapPushMany` callbacks to wrap the imperative handle,
 * plus a `streamingLegend` that should override the (empty) legend from useChartSetup.
 */
export declare function useStreamingLegend({ isPushMode, colorBy, colorScheme, showLegend, legendPosition, }: {
    /** True when data prop is undefined (push API mode) */
    isPushMode: boolean;
    /** The color-by accessor (may be derived from stackBy/groupBy/categoryAccessor) */
    colorBy: Accessor<string> | undefined;
    /** Color scheme name or custom array — undefined lets useColorScale consult the theme */
    colorScheme: string | string[] | undefined;
    /** Whether legend is requested */
    showLegend: boolean | undefined;
    /** Legend position */
    legendPosition?: LegendPosition;
}): {
    wrapPush: (originalPush: (d: Datum) => void) => (datum: Datum) => void;
    wrapPushMany: (originalPushMany: (d: any[]) => void) => (data: any[]) => void;
    resetCategories: () => void;
    streamingLegend: {
        legendGroups: {
            styleFn: (d: import("../../types/legendTypes").LegendItem) => Record<string, string | number>;
            type: "fill";
            items: {
                label: string;
                color: string;
            }[];
            label: string;
        }[];
    } | undefined;
    streamingMarginAdjust: {
        right: number;
        left?: undefined;
        top?: undefined;
        bottom?: undefined;
    } | {
        left: number;
        right?: undefined;
        top?: undefined;
        bottom?: undefined;
    } | {
        top: number;
        right?: undefined;
        left?: undefined;
        bottom?: undefined;
    } | {
        bottom: number;
        right?: undefined;
        left?: undefined;
        top?: undefined;
    } | undefined;
};
