import type { CandlePoint, LivelinePoint } from "liveline";
import type { LineChartPoint, LineChartSeries } from "./chart.types";
/** Utility helpers for normalizing and projecting chart series data for Liveline. */
export declare const normalizeSeries: (series: LineChartSeries[]) => LineChartSeries[];
export declare const formatDefaultChartValue: (value: number) => string;
export declare const resolveChartTimeFormatter: (windowSeconds: number) => (timestamp: number) => string;
export declare const toLivelinePoints: (points: LineChartPoint[]) => LivelinePoint[];
export declare const toLivelineCandles: (points: LineChartPoint[]) => CandlePoint[];
/**
 * Pad a sparse candle array so liveline always sees >= 2 entries.
 * Liveline treats `effectiveCandles.length < 2` as empty and draws "No data".
 * When only one candle exists we prepend a duplicate shifted back by one interval.
 */
export declare const padSparseCandles: (candles: CandlePoint[], intervalSeconds?: number) => CandlePoint[];
export declare const resolveCandleWidthSeconds: (points: LineChartPoint[], fallback?: number) => number | undefined;
export declare const resolveWindowSeconds: (normalizedSeries: LineChartSeries[]) => number;
/**
 * Liveline is a real-time chart that anchors its visible window to
 * `Date.now()`. Historical data that ended well before "now" falls outside
 * the visible region, causing liveline to draw "No data". Additionally,
 * liveline's multi-series render path requires `visible.length >= 2` per
 * series inside the window.
 *
 * This helper extends every series so that data reaches up to "now", ensuring
 * the points always fall inside the liveline visible window. It also guarantees
 * at least 2 points per series (the minimum liveline requires).
 *
 * The returned series should be used for both `data` and `series` props.
 */
export declare const extendSeriesToNow: (series: LineChartSeries[]) => LineChartSeries[];
export declare const resolveLatestValue: (points: LineChartPoint[]) => number;
export declare const resolveActiveSeriesId: (series: LineChartSeries[], activeSeriesId: string | null) => string;
export declare const formatDefaultSeriesLabel: (seriesItem: LineChartSeries) => string;
export declare const resolveSelectedSeries: (series: LineChartSeries[], activeSeriesId: string) => LineChartSeries | undefined;
export declare const resolvePrimaryLineData: (primarySeries: LineChartSeries | undefined) => LivelinePoint[];
