import type { ChartTimeRange, MarketChartCandle, MarketChartData, ScaledCandlePoint, Venue, VenueMarket, VenueMarketOutcome } from "@agg-build/hooks";
import type { LineChartPoint } from "../../primitives/chart";
export type OutcomeByVenue = {
    venue: VenueMarket["venue"];
    market: VenueMarket;
    outcome: VenueMarketOutcome;
};
export type OutcomeSelectorItem = {
    key: string;
    label: string;
    displayLabel: string;
};
export declare const sortOutcomeSelectorOutcomes: (outcomes: VenueMarketOutcome[]) => VenueMarketOutcome[];
export declare const isDateLikeLabel: (value: string) => boolean;
export declare const formatDateLabel: (value: string) => string;
export declare const formatXAxisDateLabel: (timestamp: number) => string;
/**
 * Returns the time window for the given range in seconds.
 *
 * @param range The time range.
 * @returns The time window.
 */
export declare const getTimeWindowByRange: (range: ChartTimeRange) => {
    startTs: number;
    endTs: number;
    intervalMinutes: number;
};
export declare const resolveInitialEventDetailsChartRange: ({ chartData, event, fallbackRange, nowSec, selectedMarket, }: {
    chartData?: MarketChartData | null;
    event: Pick<VenueMarket, "status" | "startDate" | "endDate" | "creationDate"> & {
        venueMarkets: Array<Pick<VenueMarket, "status" | "startDate" | "endDate" | "creationDate" | "resolutionDate">>;
    };
    fallbackRange?: ChartTimeRange;
    nowSec?: number;
    selectedMarket?: Pick<VenueMarket, "status" | "startDate" | "endDate" | "creationDate" | "resolutionDate"> | null;
}) => ChartTimeRange | null;
export declare const resolveOutcomeLabels: (venueMarkets: VenueMarket[]) => string[];
export declare const resolveOutcomeSelectorItems: (venueMarkets: VenueMarket[]) => OutcomeSelectorItem[];
export declare const resolveDefaultOutcomeLabel: (outcomeLabels: string[]) => string | undefined;
export declare const matchOutcomeByLabel: (outcome: VenueMarketOutcome, selectedOutcomeLabel: string) => boolean;
export declare const resolveOutcomesByVenue: (venueMarkets: VenueMarket[], selectedOutcomeLabel: string) => OutcomeByVenue[];
export declare const resolveOutcomePercentValue: (outcome: VenueMarketOutcome) => number | undefined;
export declare const buildPriceHistoryGroups: (selectedOutcomes: OutcomeByVenue[], fallbackMarketId?: string) => Array<{
    venue: Venue;
    venueMarketOutcomeIds: string[];
}>;
export declare const resolveSeriesColor: (venue: VenueMarket["venue"] | string, index: number, isDarkTheme?: boolean) => string;
/**
 * Convert scaled candle points (from useLiveCandleOverlay) to LineChartPoint[].
 * Maps candle close → line chart value. Used as a fallback when orderbook history
 * is unavailable but candlestick data exists.
 */
export declare const scaledCandlesToLineChartPoints: (candles: ScaledCandlePoint[]) => LineChartPoint[];
export declare const resolveCanonicalMarketId: (venueMarkets: Array<Pick<VenueMarket, "marketId">>, fallbackMarketId?: string | null) => string | undefined;
export declare const toChartDisplayValue: (value: number | undefined, transformProbability: (value: number) => number) => number | undefined;
export declare const marketChartCandleToLineChartPoint: (candle: MarketChartCandle, transformProbability: (value: number) => number) => LineChartPoint;
export declare const marketChartCandleToScaledCandlePoint: (candle: MarketChartCandle, transformProbability: (value: number) => number) => ScaledCandlePoint;
export declare const resolveMarketChartVenueSeries: ({ chartData, transformProbability, }: {
    chartData: MarketChartData | null | undefined;
    transformProbability: (value: number) => number;
}) => Array<{
    venue: string;
    points: LineChartPoint[];
}>;
export declare const aggregateMarketChartCandles: (candles: MarketChartCandle[]) => MarketChartCandle[];
export declare const resolveMarketChartDisplaySeries: ({ chartData, selectedVenue, transformProbability, }: {
    chartData: MarketChartData | null | undefined;
    selectedVenue?: string | null;
    transformProbability: (value: number) => number;
}) => Array<{
    venue: string;
    points: LineChartPoint[];
}>;
export declare const clampProbability: (value: number) => number;
export declare const resolveAverageProbability: (values: Array<number | undefined>) => number | undefined;
export declare const resolveMarketChartLiveState: ({ chartData, selectedVenue, transformProbability, }: {
    chartData: MarketChartData | null | undefined;
    selectedVenue?: string | null;
    transformProbability: (value: number) => number;
}) => {
    liveCandle: ScaledCandlePoint | null;
    lineValue: number | undefined;
    live: boolean;
};
