import type { ICentralAxesLayoutManagerOptions } from "../../Charting/LayoutManager/CentralAxesLayoutManager";
import type { ILayoutManagerOptions } from "../../Charting/LayoutManager/LayoutManager";
import type { I2DSubSurfaceOptions, I2DSurfaceOptions } from "../../Charting/Visuals/I2DSurfaceOptions";
import type { IPieSurfaceOptions } from "../../Charting/Visuals/SciChartPieSurface/IPieSurfaceOptions";
import type { IPieSegmentOptions } from "../../Charting/Visuals/SciChartPieSurface/PieSegment/PieSegment";
import type { SciChartPieSurface } from "../../Charting/Visuals/SciChartPieSurface/SciChartPieSurface";
import type { SciChartSurface } from "../../Charting/Visuals/SciChartSurface";
import type { I3DSurfaceOptions } from "../../Charting3D/I3DSurfaceOptions";
import type { SciChart3DSurface } from "../../Charting3D/Visuals/SciChart3DSurface";
import type { ELayoutManagerType } from "../../types/LayoutManagerType";
import type { TAnnotationDefinition } from "./AnnotationDefinitions";
import type { TAxis3DDefinition, TAxisDefinition } from "./AxisDefinitions";
import type { TSharedDataDefinition } from "./DataSeriesDefinitions";
import type { TModifier3DDefinition, TModifierDefinition } from "./ModifierDefinitions";
import type { TSeriesDefinition, TSeriesDefinition3D } from "./SeriesDefinitions";
/**
 * A definition that can be used to build a 2D Chart using {@link chartBuilder.buildChart}
 */
export interface ISciChart2DDefinition {
    /** Optional {@link I2DSurfaceOptions} to pass to the surface */
    surface?: I2DSurfaceOptions;
    /** One or an array of {@link TAxisDefinition} to describe the X Axes.  Defaults to a single numeric axis */
    xAxes?: TAxisDefinition[] | TAxisDefinition;
    /** One or an array of {@link TAxisDefinition} to describe the Y Axes.  Defaults to a single numeric axis */
    yAxes?: TAxisDefinition[] | TAxisDefinition;
    /** One or an array of {@link TSeriesDefinition} to describe the renderable series */
    series?: TSeriesDefinition[] | TSeriesDefinition;
    /** A {@link TSharedDataDefinition} object that defines data that can be referenced by the series */
    sharedData?: TSharedDataDefinition;
    /** One or an array of {@link TModifierDefinition} to describe modifiers to apply to the chart */
    modifiers?: TModifierDefinition[] | TModifierDefinition;
    /** One or an array of {@link TAnnotationDefinition} to describe annotations to apply to the chart */
    annotations?: TAnnotationDefinition[] | TAnnotationDefinition;
    /**
     * A function, or name of a registered OnCreated function that will be run after the chart is built,
     * receiving the sciChartSurface as a parameter
     */
    onCreated?: ((surface: SciChartSurface) => Promise<void>) | string;
    /**
     * Subcharts to be added to this surface
     */
    subCharts?: ISubChartDefinition[];
    /**
     * Whether to create this chart using a dedicated webassembly context.  See {@link SciChartSurface.createSingle}
     */
    createSingle?: boolean;
}
export interface ISubChartDefinition {
    /** Optional {@link I2DSubSurfaceOptions} to pass to the subSurface */
    surface?: I2DSubSurfaceOptions;
    /** One or an array of {@link TAxisDefinition} to describe the X Axes.  Defaults to a single numeric axis */
    xAxes?: TAxisDefinition[] | TAxisDefinition;
    /** One or an array of {@link TAxisDefinition} to describe the Y Axes.  Defaults to a single numeric axis */
    yAxes?: TAxisDefinition[] | TAxisDefinition;
    /** One or an array of {@link TSeriesDefinition} to describe the renderable series */
    series?: TSeriesDefinition[] | TSeriesDefinition;
    /** A {@link TSharedDataDefinition} object that defines data that can be referenced by the series */
    sharedData?: TSharedDataDefinition;
    /** One or an array of {@link TModifierDefinition} to describe modifiers to apply to the chart */
    modifiers?: TModifierDefinition[] | TModifierDefinition;
    /** One or an array of {@link TAnnotationDefinition} to describe annotations to apply to the chart */
    annotations?: TAnnotationDefinition[] | TAnnotationDefinition;
}
/**
 * A definition that can be used to build a Pie Chart using {@link chartBuilder.buildChart} or {@link chartBuilder.buildPieChart}
 */
export interface ISciChartPieDefinition {
    /** Optional {@link IPieSurfaceOptions} to pass to the surface */
    surface?: IPieSurfaceOptions;
    /**
     * Optional - The {@link IPieSegmentOptions} that specify the segments of the {@link SciChartPieSurface}
     */
    segments?: IPieSegmentOptions[];
    /**
     * A function, or name of a registered OnCreated function that will be run after the chart is built,
     * receiving the sciChartPieSurface as a parameter
     */
    onCreated?: ((surface: SciChartPieSurface) => void) | string;
}
/**
 * A definition that can be used to build a 3D Chart using {@link chartBuilder.buildChart} or {@link chartBuilder.build3DChart}
 */
export interface ISciChart3DDefinition {
    /** Optional {@link I2DSurfaceOptions} to pass to the surface */
    surface?: I3DSurfaceOptions;
    /** One {@link TAxis3DDefinition} to describe the X Axis. */
    xAxis?: TAxis3DDefinition;
    /** One {@link TAxis3DDefinition} to describe the Y Axis. */
    yAxis?: TAxis3DDefinition;
    /** One {@link TAxis3DDefinition} to describe the Z Axis. */
    zAxis?: TAxis3DDefinition;
    /** One or an array of {@link TSeriesDefinition3D} to describe the renderable series */
    series?: TSeriesDefinition3D[] | TSeriesDefinition3D;
    /** A {@link TSharedDataDefinition} object that defines data that can be referenced by the series */
    sharedData?: TSharedDataDefinition;
    /** One or an array of {@link TModifier3DDefinition} to describe modifiers to apply to the chart */
    modifiers?: TModifier3DDefinition[] | TModifier3DDefinition;
    /**
     * A function, or name of a registered OnCreated function that will be run after the chart is built,
     * receiving the sciChartSurface as a parameter
     */
    onCreated?: ((surface: SciChart3DSurface) => Promise<void>) | string;
    /**
     * Whether to create this chart using a dedicated webassembly context.  See {@link SciChart3DSurface.createSingle}
     */
    createSingle?: boolean;
}
export type TLayoutManagerDefinition = {
    type: ELayoutManagerType.Default;
    options?: ILayoutManagerOptions;
} | {
    type: ELayoutManagerType.CentralAxes;
    options?: ICentralAxesLayoutManagerOptions;
} | {
    type: ELayoutManagerType.Synchronised;
    options?: ILayoutManagerOptions;
} | {
    type: ELayoutManagerType.Polar;
    options?: ILayoutManagerOptions;
};
