import type { Datum } from "./datumTypes";
import type { Accessor } from "./types";
import { type LegendPosition } from "./hooks";
/**
 * Low-level push-API category-discovery wrapper.
 *
 * Most HOCs do NOT need this hook anymore. `useChartSetup` already
 * synthesizes a push-mode legend from categories the StreamFrame emits
 * via `onCategoriesChange`, applies the same provider/scheme/theme/
 * STREAMING_PALETTE precedence the marks resolve through, and registers
 * those categories with the parent `LinkedCharts` via
 * `useChartLegendAndMargin` → `useLinkedChartCategories`. For HOCs that
 * just want a working push-mode legend, that is enough.
 *
 * This hook is kept as the escape hatch for HOCs that must intercept
 * the push call BEFORE the frame ingests it — typically aggregator HOCs
 * like `LikertChart` that re-aggregate streamed rows into a different
 * shape (level × count) before the frame sees them. `wrapPush` /
 * `wrapPushMany` give those charts a place to run their accumulator
 * code; the wrapped function then forwards to the original push.
 *
 * Returned `streamingLegend` and `streamingMarginAdjust` are vestigial
 * for these consumers — they're produced for backward compatibility,
 * but new code should rely on `setup.legend` / `setup.margin` from
 * `useChartSetup` instead.
 */
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;
    categories: string[];
    categoryDomainProps: {
        legendCategoryAccessor: Accessor<string>;
        onCategoriesChange: (categories: string[]) => void;
    } | {
        legendCategoryAccessor?: undefined;
        onCategoriesChange?: undefined;
    };
    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;
};
