import type { BaseSeriesModel, ChartDataset, DataKey, Datum, NumericAxisScaleTransforms, SeriesExtents, SeriesModel, StackModel, XAxisModel } from "@metabase/embedding-sdk-react/dist/frontend/src/metabase/visualizations/echarts/cartesian/model/types";
import type { CartesianChartColumns } from "@metabase/embedding-sdk-react/dist/frontend/src/metabase/visualizations/lib/graph/columns";
import type { ComputedVisualizationSettings } from "@metabase/embedding-sdk-react/dist/frontend/src/metabase/visualizations/types";
import type { DatasetColumn, RawSeries, RowValue, SingleSeries, XAxisScale } from "@metabase/embedding-sdk-react/dist/frontend/src/metabase-types/api";
import type { ShowWarning } from "../../types";
/**
 * Creates a unique series key for a dataset based on the provided column, card ID, and optional breakout value.
 * For unsaved questions without cardId the format is "columnName" or "breakoutValue:columnName" for breakout series.
 * For saved questions keys include "cardId:" prefix.
 *
 * @param {DatasetColumn} column - The series metric column.
 * @param {number | undefined} cardId - The ID of the card.
 * @param {RowValue} [breakoutValue] - An optional breakout value when two dimensions columns are selected.
 * @returns {string} A unique key for the series.
 */
export declare const getDatasetKey: (column: DatasetColumn, cardId: number | undefined, breakoutValue?: RowValue) => DataKey;
/**
 * Accepts merged raw cards and raw datasets, groups and joins the metric columns on the dimension column
 * of each card.
 *
 * @param {RawSeries} rawSeries - An array of raw cards merged with raw datasets.
 * @param {CartesianChartColumns[]} cardsColumns - The column descriptors of each card.
 * @returns {ChartDataset} The aggregated dataset.
 */
export declare const getJoinedCardsDataset: (rawSeries: RawSeries, cardsColumns: CartesianChartColumns[], showWarning?: ShowWarning) => ChartDataset;
type TransformFn = (record: Datum, index: number, dataset: ChartDataset) => Datum;
type ConditionalTransform = {
    condition: boolean;
    fn: TransformFn;
};
export declare const transformDataset: (dataset: ChartDataset, transforms: (TransformFn | ConditionalTransform)[]) => ChartDataset;
export declare const computeTotal: (datum: Datum, keys: DataKey[]) => number;
export declare const getNormalizedDatasetTransform: (stackModels: StackModel[]) => TransformFn;
export declare const getKeyBasedDatasetTransform: (keys: DataKey[], valueTransform: (value: RowValue) => RowValue) => TransformFn;
export declare const getNullReplacerTransform: (settings: ComputedVisualizationSettings, seriesModels: SeriesModel[]) => TransformFn;
export declare function filterNullDimensionValues(dataset: ChartDataset, showWarning?: ShowWarning): ChartDataset;
export declare const NO_X_AXIS_VALUES_ERROR_MESSAGE: string;
export declare function replaceZeroesForLogScale(dataset: ChartDataset, seriesDataKeys: DataKey[]): ChartDataset;
export declare function scaleDataset(dataset: ChartDataset, seriesModels: BaseSeriesModel[], settings: ComputedVisualizationSettings): ChartDataset;
/**
 * Modifies the dataset for visualization according to the specified visualization settings.
 *
 * @param {ChartDataset} dataset The dataset to be transformed.
 * @param {SeriesModel[]} seriesModels Array of series models.
 * @param {ComputedVisualizationSettings} settings Computed visualization settings.
 * @param {ShowWarning | undefined} showWarning Displays a warning icon and message in the query builder.
 *
 * @returns {ChartDataset} A transformed dataset.
 */
export declare const applyVisualizationSettingsDataTransformations: (dataset: ChartDataset, stackModels: StackModel[], xAxisModel: XAxisModel, seriesModels: SeriesModel[], groupedSeriesModels: SeriesModel[], yAxisScaleTransforms: NumericAxisScaleTransforms, settings: ComputedVisualizationSettings, showWarning?: ShowWarning) => ChartDataset;
export declare const sortDataset: (dataset: ChartDataset, xAxisScale: XAxisScale | undefined, showWarning?: ShowWarning) => ChartDataset;
/**
 * Sorts the series models based on the order specified in the "graph.series_order" property of visualization settings.
 * It defines the breakout series order so that charts where all series are metrics without breakouts do not
 * rely on this property, and the series are sorted based on the metrics order in the original MBQL query.
 *
 * @param {SeriesModel[]} seriesModels - The array of series models to be sorted.
 * @param {ComputedVisualizationSettings} settings - The computed visualization settings.
 * @returns {SeriesModel[]} The sorted array of series models.
 */
export declare const getSortedSeriesModels: (seriesModels: SeriesModel[], settings: ComputedVisualizationSettings) => SeriesModel[];
type ReplacerFn = (dataKey: DataKey, value: RowValue) => RowValue;
/**
 * Creates a new dataset with the values replaced according to the provided replacer function.
 *
 * @param {ChartDataset} dataset - The original dataset.
 * @param {ReplacerFn} replacer - The function that will be used to replace values.
 * @returns {ChartDataset} A new dataset with the replaced values.
 */
export declare const replaceValues: (dataset: ChartDataset, replacer: ReplacerFn) => ChartDataset;
/**
 * Calculates the minimum and maximum values (extents) for each series in the dataset.
 *
 * @param {DataKey[]} keys - The keys of the series to calculate extents for.
 * @param {ChartDataset} dataset - The dataset containing the series data.
 * @returns {SeriesExtents} Series extent by a series data key.
 */
export declare const getDatasetExtents: (keys: DataKey[], dataset: ChartDataset) => SeriesExtents;
export declare const getSeriesExtent: (dataset: ChartDataset, key: DataKey) => null;
export declare const getCardColumnByDataKeyMap: ({ card, data }: SingleSeries, columns: CartesianChartColumns) => Record<DataKey, DatasetColumn>;
export declare const getCardsColumnByDataKeyMap: (rawSeries: RawSeries, cardsColumns: CartesianChartColumns[]) => Record<DataKey, DatasetColumn>;
export {};
