import type { ReactNode } from "react";
import type { Datum } from "./datumTypes";
import type { Accessor, ChartAccessor } from "./types";
import type { SelectionHookResult } from "./selectionUtils";
import type { HoverData } from "../../stream/types";
export interface AreaSeriesSetupOptions<TDatum extends Datum = Datum> {
    /** Sparse-filtered data array (the HOC's `safeData`). */
    safeData: TDatum[];
    /** Original `data` prop — used to short-circuit to push-mode flatten. */
    data: TDatum[] | undefined;
    /** Group accessor (`areaBy` on the HOC). When set, flat data is
     *  grouped into one series per distinct value. */
    areaBy?: ChartAccessor<TDatum, string>;
    /** Field on grouped objects that contains the coordinate array.
     *  Convention: `"coordinates"`. Pre-grouped input is detected by
     *  presence of this field on the first row. */
    lineDataAccessor: string;
    /** Effective color accessor (already resolved by HOC: AreaChart =
     *  `colorBy`; StackedAreaChart = `colorBy || areaBy`). */
    colorBy?: Accessor<string> | ChartAccessor<TDatum, string>;
    /** Resolved categorical color scale from `useChartSetup`. */
    colorScale: ((v: string) => string) | undefined;
    /** Top-level uniform `color` prop. */
    color?: string;
    /** Top-level primitive props — applied last so they win over
     *  HOC base + (future) user style. */
    stroke?: string;
    strokeWidth?: number;
    opacity?: number;
    /** Selection hook output (`setup.effectiveSelectionHook`). */
    effectiveSelectionHook: SelectionHookResult | null | undefined;
    /** Resolved selection config (`setup.resolvedSelection`). */
    resolvedSelection: import("./types").SelectionConfig | undefined;
    /** Area fillOpacity. @default 0.7 */
    areaOpacity: number;
    /** Render line on top of fill. @default true */
    showLine: boolean;
    /** Line stroke width. @default 2 */
    lineWidth: number;
    /** Render points along the line. @default false */
    showPoints: boolean;
    /** Point radius when `showPoints`. @default 3 */
    pointRadius: number;
    xAccessor: ChartAccessor<TDatum, number | Date | string>;
    yAccessor: ChartAccessor<TDatum, number>;
    xLabel?: string;
    yLabel?: string;
    /** Tooltip-side x formatter — same signature as `AxisConfig.xFormat`
     *  so the HOC can forward the prop verbatim. ReactNode return is OK. */
    xFormat?: (d: number | Date | string, index?: number, allTicks?: number[]) => string | ReactNode;
    yFormat?: (d: number | Date | string) => string | ReactNode;
    /** Field used to label the series row in the default tooltip.
     *  Typically `areaBy ?? colorBy`. */
    groupField?: Accessor<string> | ChartAccessor<TDatum, string>;
    /** Optional band prop — when set, the default tooltip surfaces a
     *  pair of rows per band (low + high). Threaded through verbatim. */
    band?: unknown;
}
export interface AreaSeriesSetupResult<TDatum extends Datum = Datum> {
    /** Flat data array ready for `<StreamXYFrame data={…} />`. Empty
     *  when the HOC is in push mode (no `data` prop). */
    flattenedData: TDatum[];
    /** Selection-aware line/area style fn. */
    lineStyle: (d: Datum) => Record<string, string | number>;
    /** Selection-aware point style fn — `undefined` when `showPoints`
     *  is false so the HOC can spread it conditionally. */
    pointStyle: ((d: Datum) => Record<string, string | number>) | undefined;
    /** Default tooltip content fn for the chart. */
    defaultTooltipContent: (hover: HoverData) => ReactNode;
}
/**
 * Build the area-series pieces for an area-shaped XY HOC.
 * The HOC still owns chart-specific frame props (chartType,
 * gradientFill, normalize, baseline, stackOrder) and all the
 * passthrough wiring; this hook covers the part both shared
 * verbatim before extraction.
 */
export declare function useAreaSeriesSetup<TDatum extends Datum = Datum>(options: AreaSeriesSetupOptions<TDatum>): AreaSeriesSetupResult<TDatum>;
