import type { IBoxPlotDataSeriesOptions } from "../../Charting/Model/BoxPlotDataSeries";
import type { IHlcDataSeriesOptions } from "../../Charting/Model/HlcDataSeries";
import type { EDataSeriesType } from "../../Charting/Model/IDataSeries";
import type { INonUniformHeatmapSeriesOptions } from "../../Charting/Model/NonUniformHeatmapDataSeries";
import type { IOhlcDataSeriesOptions } from "../../Charting/Model/OhlcDataSeries";
import type { IUniformHeatmapSeriesOptions } from "../../Charting/Model/UniformHeatmapDataSeries";
import type { IXyDataSeriesOptions } from "../../Charting/Model/XyDataSeries";
import type { IXyNDataSeriesOptions } from "../../Charting/Model/XyNDataSeries";
import type { IXyTextDataSeriesOptions } from "../../Charting/Model/XyTextDataSeries";
import type { IXyxDataSeriesOptions } from "../../Charting/Model/XyxDataSeries";
import type { IXyxyDataSeriesOptions, XyxyDataSeries } from "../../Charting/Model/XyxyDataSeries";
import type { IXyyDataSeriesOptions } from "../../Charting/Model/XyyDataSeries";
import type { IXyzDataSeriesOptions } from "../../Charting/Model/XyzDataSeries";
import type { IHlcScaleOffsetFilterOptions } from "../../Charting/Model/Filters/HlcScaleOffsetFilter";
import type { IOhlcScaleOffsetFilterOptions } from "../../Charting/Model/Filters/OhlcScaleOffsetFilter";
import type { IXyFilterOptions } from "../../Charting/Model/Filters/XyFilterBase";
import type { IXyMovingAverageFilterOptions } from "../../Charting/Model/Filters/XyMovingAverageFilter";
import type { IXyRatioFilterOptions } from "../../Charting/Model/Filters/XyRatioFilter";
import type { IXyScaleOffsetFilterOptions } from "../../Charting/Model/Filters/XyScaleOffsetFilter";
import type { IXyyScaleOffsetFilterOptions } from "../../Charting/Model/Filters/XyyScaleOffsetFilter";
import type { IXyzScaleOffsetFilterOptions } from "../../Charting/Model/Filters/XyzScaleOffsetFilter";
import type { EDataSeriesType3D } from "../../Charting3D/Model/DataSeries/BaseDataSeries3D";
import type { IUniformGridDataSeries3DOptions } from "../../Charting3D/Model/DataSeries/UniformGridDataSeries3D";
import type { IXyzDataSeries3DOptions } from "../../Charting3D/Model/DataSeries/XyzDataSeries3D";
import type { EDataFilterType } from "../../types/DataFilterType";
/**
 * Shared data that can be used in {@link ISciChart2DDefinition}
 * or directly in {@link chartBuilder.buildSeries} or {@link chartBuilder.buildDataSeries}
 */
export type TSharedDataDefinition = Record<number | string, number[]>;
/** Definition of a data filter */
export type TFilterDefinition = {
    type: EDataFilterType.XyLinearTrend;
    options?: IXyFilterOptions;
} | {
    type: EDataFilterType.XyMovingAverage;
    options?: IXyMovingAverageFilterOptions;
} | {
    type: EDataFilterType.XyRatio;
    options: IXyRatioFilterOptions;
} | {
    type: EDataFilterType.XyScaleOffset;
    options?: IXyScaleOffsetFilterOptions;
} | {
    type: EDataFilterType.XyyScaleOffset;
    options?: IXyyScaleOffsetFilterOptions;
} | {
    type: EDataFilterType.XyzScaleOffset;
    options?: IXyzScaleOffsetFilterOptions;
} | {
    type: EDataFilterType.HlcScaleOffset;
    options?: IHlcScaleOffsetFilterOptions;
} | {
    type: EDataFilterType.OhlcScaleOffset;
    options?: IOhlcScaleOffsetFilterOptions;
};
/** Definition of XY data */
export type TXySeriesData = {
    /** The id of sharedData to use for X data.  You must either specify both xDataId and yDataId, or both xValues and yValues */
    xDataId?: number | string;
    /** The id of sharedData to use for Y data.  You must either specify both xDataId and yDataId, or both xValues and yValues */
    yDataId?: number | string;
} & IXyDataSeriesOptions & {
    filter?: TFilterDefinition;
};
/** Definition of XYXY data */
export type TXyxySeriesData = {
    /** The id of sharedData to use for X data.
     * You must either specify all of xDataId, yDataId, x1DataId and y1DataId, or all of xValues, yValues, x1Values and y1Values
     */
    xDataId?: number | string;
    /** The id of sharedData to use for Y data.
     * You must either specify all of xDataId, yDataId, x1DataId and y1DataId, or all of xValues, yValues, x1Values and y1Values
     */
    yDataId?: number | string;
    /** The id of sharedData to use for X1 data.
     * You must either specify all of xDataId, yDataId, x1DataId and y1DataId, or all of xValues, yValues, x1Values and y1Values
     */
    x1DataId?: number | string;
    /** The id of sharedData to use for Y1 data.
     * You must either specify all of xDataId, yDataId, x1DataId and y1DataId, or all of xValues, yValues, x1Values and y1Values
     */
    y1DataId?: number | string;
} & IXyxyDataSeriesOptions;
/** Definition of XYXY data */
export type TXyxSeriesData = {
    /** The id of sharedData to use for X data.
     * You must either specify all of xDataId, yDataId, x1DataId and y1DataId, or all of xValues, yValues, x1Values and y1Values
     */
    xDataId?: number | string;
    /** The id of sharedData to use for Y data.
     * You must either specify all of xDataId, yDataId, x1DataId and y1DataId, or all of xValues, yValues, x1Values and y1Values
     */
    yDataId?: number | string;
    /** The id of sharedData to use for X1 data.
     * You must either specify all of xDataId, yDataId, x1DataId and y1DataId, or all of xValues, yValues, x1Values and y1Values
     */
    x1DataId?: number | string;
} & IXyxDataSeriesOptions;
/** Definition of XYN data */
export type TXynSeriesData = {
    xDataId?: number | string;
    yDataIds: Array<number | string>;
} & IXyNDataSeriesOptions;
/** Definition of XYY data */
export type TXyySeriesData = {
    /** The id of sharedData to use for X data.
     * You must either specify all of xDataId, yDataId and y1DataId, or all of xValues, yValues and y1Values
     */
    xDataId?: number | string;
    /** The id of sharedData to use for Y data.
     * You must either specify all of xDataId, yDataId and y1DataId, or all of xValues, yValues and y1Values
     */
    yDataId?: number | string;
    /** The id of sharedData to use for Y1 data.
     * You must either specify all of xDataId, yDataId and y1DataId, or all of xValues, yValues and y1Values
     */
    y1DataId?: number | string;
} & IXyyDataSeriesOptions & {
    filter?: TFilterDefinition;
};
/** Definition of XYZ data */
export type TXyzSeriesData = {
    /** The id of sharedData to use for X data.
     * You must either specify all of xDataId, yDataId and zDataId, or all of xValues, yValues and zValues
     */
    xDataId?: number | string;
    /** The id of sharedData to use for Y data.
     * You must either specify all of xDataId, yDataId and zDataId, or all of xValues, yValues and zValues
     */
    yDataId?: number | string;
    /** The id of sharedData to use for Z data.
     * You must either specify all of xDataId, yDataId and zDataId, or all of xValues, yValues and zValues
     */
    zDataId?: number | string;
} & IXyzDataSeriesOptions & {
    filter?: TFilterDefinition;
};
/** Definition of Open, High, Low, Close data */
export type TOhlcSeriesData = {
    /** The id of sharedData to use for X data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    xDataId?: number | string;
    /** The id of sharedData to use for Open data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    openDataId?: number | string;
    /** The id of sharedData to use for High data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    highDataId?: number | string;
    /** The id of sharedData to use for Low data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    lowDataId?: number | string;
    /** The id of sharedData to use for Close data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    closeDataId?: number | string;
} & IOhlcDataSeriesOptions & {
    filter?: TFilterDefinition;
};
/** Definition of Open, High, Low, Close data */
export type THlcSeriesData = {
    /** The id of sharedData to use for X data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    xDataId?: number | string;
    /** The id of sharedData to use for High data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    highDataId?: number | string;
    /** The id of sharedData to use for Low data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    lowDataId?: number | string;
    /** The id of sharedData to use for Close data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    closeDataId?: number | string;
} & IHlcDataSeriesOptions & {
    filter?: TFilterDefinition;
};
/** Definition of Box Series data */
export type TBoxPlotSeriesData = {
    /** The id of sharedData to use for X data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    xDataId?: number | string;
    /** The id of sharedData to use for Median data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    medianDataId?: number | string;
    /** The id of sharedData to use for Max data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    maxDataId?: number | string;
    /** The id of sharedData to use for Upper data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    upperDataId?: number | string;
    /** The id of sharedData to use for Lower data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    lowerDataId?: number | string;
    /** The id of sharedData to use for Minimun data.  You must either use all DataId or all Values properties.  You cannot mix them. */
    minDataId?: number | string;
} & IBoxPlotDataSeriesOptions & {
    filter?: TFilterDefinition;
};
/** Definition of XYText data */
export type TXyTextSeriesData = {
    /** The id of sharedData to use for X data.
     * You must either specify all of xDataId, yDataId and textValues, or all of xValues, yValues and textValues
     */
    xDataId?: number | string;
    /** The id of sharedData to use for Y data.
     * You must either specify all of xDataId, yDataId and textValues, or all of xValues, yValues and textValues
     */
    yDataId?: number | string;
} & IXyTextDataSeriesOptions & {
    filter?: TFilterDefinition;
};
/** Definition of series data, which can take various shapes */
export type TSeriesDataDefinition = TXySeriesData | TXyySeriesData | TXyzSeriesData | XyxyDataSeries | TXynSeriesData | THlcSeriesData | TOhlcSeriesData | TXyTextSeriesData | IUniformHeatmapSeriesOptions | INonUniformHeatmapSeriesOptions;
export type TDataSeriesDefinition = {
    type: EDataSeriesType;
    options: TSeriesDataDefinition;
};
/** Definition of XYZ 3D data */
export type TXyzSeries3DData = {
    /** The id of sharedData to use for X data.
     * You must either specify all of xDataId, yDataId and zDataId, or all of xValues, yValues and zValues
     */
    xDataId?: number | string;
    /** The id of sharedData to use for Y data.
     * You must either specify all of xDataId, yDataId and zDataId, or all of xValues, yValues and zValues
     */
    yDataId?: number | string;
    /** The id of sharedData to use for Z data.
     * You must either specify all of xDataId, yDataId and zDataId, or all of xValues, yValues and zValues
     */
    zDataId?: number | string;
} & IXyzDataSeries3DOptions;
export type TUniformGrid3DData = {} & IUniformGridDataSeries3DOptions;
export type TSeriesDataDefinition3D = TXyzSeries3DData | TUniformGrid3DData;
export type TDataSeriesDefinition3D = {
    type: EDataSeriesType3D;
    options: TSeriesDataDefinition3D;
};
