import type { AggUiLabels, MarketOrderbookData, VenueMarket } from "@agg-build/hooks";
import { buildPriceHistoryGroups, formatXAxisDateLabel, getTimeWindowByRange, resolveCanonicalMarketId, resolveMarketChartDisplaySeries, resolveMarketChartLiveState, resolveMarketChartVenueSeries, resolveOutcomesByVenue, resolveSeriesColor, scaledCandlesToLineChartPoints } from "../item-details/event-list-item-details.utils";
import { resolveOutcomeTitle } from "../item/event-list-item.utils";
import type { OrderbookRowData } from "../orderbook/orderbook.types";
import type { MarketDetailsHeaderOutcomeItem, MarketDetailsMetaRow, MarketDetailsOrderBookTone, MarketDetailsTab } from "./market-details.types";
export { formatProbabilityCents, resolveOrderBookRows, resolveUnifiedOrderBookEntries, } from "../orderbook/orderbook.utils";
/**
 * Converts aggregated orderbook data (from `useMarketOrderbook`) into presentational
 * `OrderbookRowData[]` for the `Orderbook` component.
 *
 * Each `AggregatedOrderbookLevel` has a `venues` map (venue → size). We keep all
 * contributing venues so the row can display multiple logos.
 */
export declare const resolveAggregatedOrderBookRows: ({ orderbookData, side, }: {
    orderbookData: MarketOrderbookData | null | undefined;
    side: "asks" | "bids";
}) => OrderbookRowData[];
export declare const resolveInitialTab: (defaultTab: MarketDetailsTab | undefined) => MarketDetailsTab;
export type ResolvedMarket = {
    id: string;
    venueMarkets: VenueMarket[];
    volume: number | null | undefined;
    status?: string;
    startDate?: string | null;
    endDate?: string | null;
    creationDate?: string | null;
    question: string;
};
/**
 * Build a ResolvedMarket from a flat array of venue markets.
 * When `marketId` is provided, resolves the full logical match cluster for that market.
 * When `marketId` is omitted, uses all provided markets.
 */
export declare const resolveMarketFromVenueMarkets: (venueMarkets: VenueMarket[], marketId: string | undefined) => ResolvedMarket | undefined;
export declare const resolveDisplayOutcomeLabels: (labels: string[]) => string[];
export declare const resolveInitialOutcomeLabel: (labels: string[], defaultOutcomeLabel: string | undefined) => string | undefined;
export declare const resolveScopedSelectedOutcome: ({ venueMarkets, selectedOutcomeId, defaultOutcomeLabel, suppressFallbackWhenSelectedOutcomeOutOfScope, }: {
    venueMarkets: VenueMarket[];
    selectedOutcomeId: string | null | undefined;
    defaultOutcomeLabel: string | undefined;
    suppressFallbackWhenSelectedOutcomeOutOfScope?: boolean;
}) => {
    outcomeId: string | null;
    outcomeLabel: string | undefined;
};
export declare const resolveAverageProbabilityByLabel: (venueMarkets: VenueMarket[], labels: string[]) => Map<string, number | undefined>;
export declare const formatProbabilityPercent: (value: number | null | undefined, formatPercent?: (value: number) => string) => string;
export declare const resolveOutcomeTone: (label: string, index: number) => MarketDetailsOrderBookTone;
export declare const resolveHeaderOutcomeItems: (venueMarkets: VenueMarket[], scopedMarket?: VenueMarket | null, variant?: MarketDetailsHeaderOutcomeItem["variant"]) => MarketDetailsHeaderOutcomeItem[];
export declare const resolveSubtitle: ({ venueMarkets, volume, formatCompactCurrency, labels, }: {
    venueMarkets: VenueMarket[];
    volume: number | undefined;
    formatCompactCurrency: (value: number) => string;
    labels: AggUiLabels;
}) => string;
export declare const resolveOtherTabRows: (market: ResolvedMarket, labels: AggUiLabels) => MarketDetailsMetaRow[];
export declare const buildMarketDetailsModel: ({ venueMarkets, marketId, title, image, formatCompactCurrency, labels, }: {
    venueMarkets: VenueMarket[];
    marketId: string | undefined;
    title: string | undefined;
    image: string | null | undefined;
    formatCompactCurrency: (value: number) => string;
    labels: AggUiLabels;
}) => {
    market: ResolvedMarket;
    primaryVenueMarket: VenueMarket;
    title: string;
    image: string | undefined;
    subtitle: string;
    outcomeLabels: string[];
    probabilityByLabel: Map<string, number | undefined>;
} | undefined;
export { buildPriceHistoryGroups, formatXAxisDateLabel, getTimeWindowByRange, resolveCanonicalMarketId, resolveMarketChartDisplaySeries, resolveMarketChartLiveState, resolveMarketChartVenueSeries, resolveOutcomesByVenue, resolveOutcomeTitle, resolveSeriesColor, scaledCandlesToLineChartPoints, };
