import type { Datum } from "./datumTypes";
import type { Ref, RefObject } from "react";
import type { StreamOrdinalFrameHandle } from "../../stream/ordinalTypes";
import type { RealtimeFrameHandle } from "../../realtime/types";
import type { Accessor } from "./types";
import type { LegendPosition } from "./hooks";
interface UseOrdinalStreamingConfig {
    /** External ref for push API */
    ref: Ref<RealtimeFrameHandle>;
    /** Internal frame ref */
    frameRef: RefObject<StreamOrdinalFrameHandle | null>;
    /** True when data prop is undefined (push API mode) */
    isPushMode: boolean;
    /** Color-by accessor (may be derived from stackBy/groupBy/etc.) */
    colorBy: Accessor<string> | undefined;
    /** Color scheme name or array — undefined lets useColorScale consult the theme */
    colorScheme: string | string[] | undefined;
    /** Whether legend is requested */
    showLegend: boolean | undefined;
    /** Legend position */
    legendPosition?: LegendPosition;
    /** Results from useChartSetup — needed for legend/margin merge */
    setup: {
        legendBehaviorProps: Datum;
        legendPosition: LegendPosition;
        margin: {
            top: number;
            right: number;
            bottom: number;
            left: number;
        };
    };
}
interface UseOrdinalStreamingResult {
    /** Legend props merged with streaming legend (spread into streamProps) */
    effectiveLegendProps: Datum;
    /** Margin merged with streaming legend margin adjustments */
    effectiveMargin: {
        top: number;
        right: number;
        bottom: number;
        left: number;
    };
}
/**
 * Shared hook for ordinal charts that support push API + streaming legend.
 *
 * Consolidates: useStreamingLegend, wrappedPush/pushMany,
 * useImperativeHandle, effectiveLegendProps, effectiveMargin.
 *
 * Used by: StackedBarChart, GroupedBarChart, PieChart, DonutChart, SwimlaneChart.
 * NOT used by LikertChart (custom accumulator + deterministic legend).
 */
export declare function useOrdinalStreaming({ ref, frameRef, isPushMode, colorBy, colorScheme, showLegend, legendPosition, setup, }: UseOrdinalStreamingConfig): UseOrdinalStreamingResult;
export {};
