import type { Datum } from "./datumTypes";
import type { Accessor } from "./types";
import type { ForecastConfig, AnomalyConfig } from "./statisticalOverlays";
export interface SeriesFeaturesOptions {
    /** Sparse-filtered chart data (the HOC's `safeData`). */
    data: Datum[];
    /** x accessor — string or function. */
    xAccessor: Accessor<number | Date | string>;
    /** y accessor — string or function. */
    yAccessor: Accessor<number>;
    /** Optional forecast configuration. When set, the hook adds
     *  segment-tagged future points to `effectiveData` and appends
     *  envelope/forecast-line annotations. */
    forecast?: ForecastConfig | undefined;
    /** Optional anomaly configuration (band + dot overlay). */
    anomaly?: AnomalyConfig | undefined;
    /** When the consuming HOC supports grouped series (e.g. LineChart's
     *  `lineBy`), pass the grouping field name so the overlay pipeline
     *  can do group-aware boundary duplication. Required when the same
     *  data array carries multiple metric series interleaved by x. */
    groupBy?: Accessor<string> | undefined;
}
export interface SeriesFeaturesResult {
    /** Data to forward to the frame. When forecast adds future points,
     *  this is the augmented set; otherwise the original `data`. */
    effectiveData: Datum[];
    /** Annotations the chart should merge into its own annotations
     *  array (envelope, anomaly band, anomaly dots). Empty when
     *  forecast/anomaly are unset or still loading. */
    statisticalAnnotations: Datum[];
    /** True when forecast is active and processedData differs from
     *  the input data. Useful for HOC-side branches (e.g. LineChart's
     *  compound-group accessor). */
    hasForecast: boolean;
    /** Resolved string key for the x axis — either the user's string
     *  accessor or a synthetic key written by the bake step. The
     *  forecast/anomaly pipeline reads through this key. */
    xAccessorKey: string;
    /** Resolved string key for the y axis (mirror of xAccessorKey). */
    yAccessorKey: string;
}
/**
 * Build series feature overlays (forecast + anomaly) for a chart.
 * Returns the effective data + annotations to merge into the
 * chart's stream-frame props. Returns the input data unchanged when
 * neither prop is set.
 *
 * @example
 * ```tsx
 * const { effectiveData, statisticalAnnotations } = useSeriesFeatures({
 *   data: safeData, xAccessor, yAccessor, forecast, anomaly,
 * })
 * const mergedAnnotations = [...(annotations || []), ...statisticalAnnotations]
 * // forward effectiveData + mergedAnnotations to the frame
 * ```
 */
export declare function useSeriesFeatures(options: SeriesFeaturesOptions): SeriesFeaturesResult;
