import * as React from "react";
import type { HoverData } from "../../realtime/types";
import type { Datum } from "./datumTypes";
export interface TooltipFieldConfig {
    label: string;
    accessor: string | ((d: any) => any);
    role?: "title" | "x" | "y" | "color" | "size" | "group" | "value";
    /** Per-field formatter. HOCs pass `xFormat`/`yFormat`/`valueFormat` here so
     *  the default tooltip renders values consistently with the axis. Typed
     *  permissively (`any` → `ReactNode`) to match the mixed formatter
     *  signatures across ordinal (`(d: string | number) => string`) and XY
     *  (`(d, index?, allTicks?) => ReactNode`). A ReactNode return renders
     *  as-is in the tooltip span. If the formatter throws, the tooltip
     *  falls back to the built-in `formatVal`. */
    format?: (v: any, ...rest: any[]) => React.ReactNode;
}
/**
 * Extract a display name from an accessor.
 * Strings return themselves; functions return "value".
 */
export declare function accessorName(acc: string | ((...args: any[]) => any)): string;
export declare function formatVal(v: unknown): string;
export declare function resolveValue(d: Datum, acc: string | ((d: Datum) => any)): unknown;
/**
 * Build a default tooltipContent function for StreamXYFrame HOCs.
 * Receives HoverData ({ data, time, value, x, y }) and renders
 * labeled fields derived from the HOC's props.
 */
export declare function buildDefaultTooltip(fields: TooltipFieldConfig[]): (hover: HoverData) => React.ReactNode;
/**
 * Build a default tooltip for ordinal charts (BarChart, DotPlot, SwarmPlot, etc.).
 * Shows a bold category header, formatted value, and optional group field.
 *
 * @param pieData - If true, extracts datum via `d.data?.[0] || d.data || d`
 *   (PieChart/DonutChart wrap data in arrays). Default: `d.data || d`.
 */
export declare function buildOrdinalTooltip({ categoryAccessor, valueAccessor, groupAccessor, groupLabel, pieData, valueFormat, }: {
    categoryAccessor: string | ((d: Datum) => any);
    valueAccessor: string | ((d: Datum) => any);
    groupAccessor?: string | ((d: Datum) => any);
    groupLabel?: string;
    pieData?: boolean;
    /** Same formatter the HOC passes to the value axis. Threaded here so the
     *  default tooltip shows values consistently with the axis ("$450k", not
     *  "450000"). Override by passing a custom `tooltip` prop. */
    valueFormat?: (v: any, ...rest: any[]) => React.ReactNode;
}): (d: Datum) => React.ReactNode;
