import type { ChartTimeRange, MarketChartData } from "@agg-build/hooks";
/**
 * True when the chart payload has no usable bars *inside the visible domain*
 * — i.e. the selected range yielded nothing to plot. A `null`/`undefined`
 * payload (query not yet resolved) is also treated as "no data here" because
 * the fallback decision uses this together with an `isLoading` guard.
 *
 * `liveCandle` counts as data: a market that just started trading inside the
 * current bucket has a single forming candle and no closed bars; the chart
 * should still render that.
 *
 * **Domain filtering**: pass `minTimeSec` (the rolling window's `startTs`) to
 * ignore stale "courtesy" bars the API returns outside the requested window.
 * Without this, a market that last traded 11h ago would surface a single
 * out-of-window bar in `candles`, the chart would filter it out visually,
 * but the emptiness check would think the chart has data — auto-fallback
 * never fires and the user sees an empty plot.
 */
export declare const isMarketChartEmpty: (data: MarketChartData | null | undefined, options?: {
    minTimeSec?: number;
}) => boolean;
/**
 * Decide whether the chart should auto-switch to the `ALL` range. We do this
 * exactly once per chart subject (the caller's ref guard) so a user who later
 * manually re-picks the empty range isn't fought by a second auto-switch.
 *
 * Bail conditions, in order:
 *   - we've already fallen back for this subject
 *   - we're already on `ALL` (nothing wider to fall back to)
 *   - the query errored — leave the failure surface to the error UI
 *   - the query is still loading — wait for a real answer
 *   - we have no payload yet — same reasoning
 * Otherwise: fall back iff the payload is empty within the rolling domain.
 */
export declare const shouldAutoFallbackToAllRange: ({ chartData, isLoading, error, currentRange, hasAlreadyFallenBack, domainStartTs, }: {
    chartData: MarketChartData | null | undefined;
    isLoading: boolean;
    error: unknown;
    currentRange: ChartTimeRange;
    hasAlreadyFallenBack: boolean;
    /** Rolling-window startTs in seconds. Bars older than this are ignored. */
    domainStartTs?: number;
}) => boolean;
