import type { ReactNode } from "react";
import type { Datum } from "./datumTypes";
import { type TooltipProp } from "../../Tooltip/Tooltip";
import type { HoverData } from "../../realtime/types";
import type { HoverHighlightMode, LinkedHoverProp, SelectionConfig } from "./types";
import type { OnObservationCallback } from "../../store/ObservationStore";
import type { AnimateProp } from "../../stream/pipelineTransitionUtils";
import type { AutoPlaceAnnotations } from "../../recipes/annotationLayout";
/**
 * The frames accept `tooltipContent: (d: HoverData) => ReactNode`,
 * which is a slightly wider parameter than the `TooltipContentFn`
 * (`(d: Datum) => ReactNode`) the `Tooltip` module exports. The HOC
 * default tooltip generated by `buildDefaultTooltip` matches the
 * wider shape; user-provided tooltip functions (via `normalizeTooltip`)
 * conform to the narrower `Datum` shape. At runtime both work because
 * `HoverData` carries the original `Datum` plus interaction metadata,
 * and the user's tooltip body reads only fields it knows about.
 *
 * Typing the helper's return at the wider `HoverData` shape lets either
 * source flow through without a cast at the call site, matching the
 * inline form HOCs used before this refactor.
 */
type FrameTooltipContent = (d: HoverData) => ReactNode;
/**
 * Returns the spreadable subset of base metadata props for the frame.
 *
 *   - Truthy gate for `title` / `description` / `summary` / `className`:
 *     empty strings should NOT shadow the frame's own defaults.
 *   - Defined gate for `accessibleTable`: an explicit `false` is a real
 *     consumer choice (suppresses the sr-only data table) and must
 *     reach the frame.
 *   - Defined-and-non-null gate for `animate`: matches `props.animate
 *     != null`. Lets `false` through (disables animation explicitly)
 *     while filtering `undefined` so the frame's intro-on-default
 *     stays in effect.
 *
 * The returned object is suitable for `...spread` into a frame-props
 * object literal.
 */
export interface BaseMetadataProps {
    title?: string | ReactNode;
    description?: string;
    summary?: string;
    accessibleTable?: boolean;
    className?: string;
    animate?: AnimateProp;
    /** Strictly speaking not "metadata" — but the spread-when-defined
     *  pattern is identical, and every XY/ordinal HOC needs to forward
     *  this to the frame. Bundling it here avoids a parallel helper
     *  + 22 separate adoption edits. */
    axisExtent?: import("./axisExtent").AxisExtentMode;
    autoPlaceAnnotations?: AutoPlaceAnnotations;
}
export declare function buildBaseMetadataProps(input: BaseMetadataProps): BaseMetadataProps;
/**
 * Returns the spreadable hover/click behavior props for the frame.
 *
 * The predicates encode the same logic the HOCs already used inline:
 *
 *   - `customHoverBehavior` is forwarded only when at least one
 *     consumer-side hover-driving prop is set (`linkedHover` for
 *     cross-chart highlight, `onObservation` for AI observation
 *     emission, `onClick` for click resolution that needs hover-driven
 *     hit testing, `hoverHighlight` for the dim-non-hovered effect).
 *   - `customClickBehavior` mirrors the click-driving subset
 *     (`onObservation`, `onClick`, `linkedHover` for cross-chart
 *     selection lock).
 *
 * Returning the props as a spreadable object means HOCs that don't
 * need either get an empty merge that adds nothing.
 */
export declare function buildCustomBehaviorProps(input: {
    linkedHover?: LinkedHoverProp;
    onObservation?: OnObservationCallback;
    onClick?: ((datum: Datum, position: {
        x: number;
        y: number;
    }) => void) | undefined;
    hoverHighlight?: HoverHighlightMode;
    customHoverBehavior: (d: Datum | null) => void;
    customClickBehavior: (d: Datum | null) => void;
    /**
     * Whether `linkedHover` participates in the click predicate. Most
     * XY / ordinal HOCs say yes — `linkedHover` cross-chart selection
     * fires on click-to-lock as well as hover. Geo HOCs and
     * `CandlestickChart` say no — their click resolution only needs
     * direct consumer-side handlers (`onObservation` / `onClick`).
     * Default is `true` to match the more common case.
     */
    linkedHoverInClickPredicate?: boolean;
}): {
    customHoverBehavior?: (d: Datum | null) => void;
    customClickBehavior?: (d: Datum | null) => void;
};
/**
 * Resolve the `tooltipContent` prop for the frame.
 *
 *   - `tooltip === false` → noop function (suppresses the frame's
 *     default tooltip rendering entirely).
 *   - Otherwise → `normalizeTooltip(tooltip)` (a function, possibly
 *     returned by `Tooltip({ ... })` / `MultiLineTooltip({ ... })`),
 *     falling back to the chart's own `defaultTooltipContent` if
 *     `tooltip` is undefined or an unrecognized form.
 *
 * Returning `tooltipContent` as an object means HOCs spread it like
 * the other helpers and don't have to remember the noop-vs-default
 * branch in line.
 */
export declare function buildTooltipProps(input: {
    tooltip: TooltipProp | undefined;
    defaultTooltipContent: FrameTooltipContent;
}): {
    tooltipContent: FrameTooltipContent;
};
/**
 * Selection-config alias. Re-exported so HOCs that use these helpers
 * don't need a parallel import path for the type that flows through
 * `buildCustomBehaviorProps`.
 */
export type { SelectionConfig };
