import type { DatumDefault, ExtensibleTheme, SeriesDefaultAxes, SeriesPredictAxis, SeriesType } from 'ag-charts-types';
import type { OptionsDefs, ValidationResult } from '../state/validation';
import type { ScaleType } from '../types/scales';
import type { Point } from '../types/scene';
export declare enum ModuleType {
    Chart = "chart",
    Axis = "axis",
    Series = "series",
    Plugin = "plugin",
    AxisPlugin = "axis:plugin",
    SeriesPlugin = "series:plugin",
    Preset = "preset"
}
export type ModuleTypeSwitch<TModule extends ModuleType, TOptions = any> = TModule extends ModuleType.Chart ? ChartModuleDefinition<TOptions> : TModule extends ModuleType.Axis ? AxisModuleDefinition<TOptions> : TModule extends ModuleType.Series ? SeriesModuleDefinition<TOptions> : TModule extends ModuleType.Preset ? PresetModuleDefinition<TOptions> : TModule extends ModuleType.Plugin ? PluginModuleDefinition<TOptions> : TModule extends ModuleType.AxisPlugin ? AxisPluginModuleDefinition<TOptions> : TModule extends ModuleType.SeriesPlugin ? SeriesPluginModuleDefinition<TOptions> : never;
export interface ModuleInstance {
    destroy?(this: void): void;
}
export interface SeriesModuleInstance extends ModuleInstance {
}
export interface PluginModuleInstance extends ModuleInstance {
    enabled?: boolean;
    processData?(dataController: any): Promise<void> | void;
}
export type PickNodeDatumResult = {
    datum: NonNullable<any>;
    distanceSquared: number;
} | undefined;
export interface PropertyDefinitionOpts {
    isContinuousX: boolean;
    isContinuousY: boolean;
    xScaleType?: ScaleType;
    yScaleType?: ScaleType;
}
export interface SeriesPluginModuleInstance extends ModuleInstance {
    pickNodeExact(point: Point): PickNodeDatumResult;
    pickNodeNearest(point: Point): PickNodeDatumResult;
    pickNodeMainAxisFirst(point: Point, majorDirection: any): PickNodeDatumResult | undefined;
    getPropertyDefinitions(opts: PropertyDefinitionOpts): any[];
    getDomain(direction: any): any[];
    getTooltipParams(): object;
}
export interface ModuleDefinition<TModule extends ModuleType = ModuleType, TOptions = any, TInstance extends ModuleInstance = ModuleInstance> {
    readonly type: `${TModule}` | TModule;
    readonly name: string;
    readonly version: string;
    readonly enterprise?: boolean;
    readonly dependencies?: ModuleDefinition[];
    readonly placeholder?: boolean;
    options?: OptionsDefs<TOptions>;
    themeTemplate?: ExtensibleTheme<any>;
    style?: string;
    create(this: void, ...args: any[]): TInstance;
    validate?(this: void, options: unknown, optionsDefs: OptionsDefs<TOptions>, path: string): ValidationResult<TOptions>;
}
export interface ChartModuleDefinition<TOptions> extends ModuleDefinition<ModuleType.Chart, TOptions> {
    options: OptionsDefs<TOptions>;
}
export interface PresetModuleDefinition<TOptions> extends ModuleDefinition<ModuleType.Preset, TOptions> {
    options: OptionsDefs<TOptions>;
    create(this: void, options: unknown, ...args: any[]): any;
    processData?(this: void, data: unknown): {
        data?: unknown[];
        series?: Array<{
            xKey: string;
            yKey: string;
        }>;
    };
}
export interface AxisModuleDefinition<TOptions> extends ModuleDefinition<ModuleType.Axis, TOptions> {
    readonly chartType: string;
    options: OptionsDefs<TOptions>;
}
export interface SeriesModuleDefinition<TOptions> extends ModuleDefinition<ModuleType.Series, TOptions, SeriesModuleInstance> {
    readonly chartType: string;
    readonly groupable?: boolean;
    readonly stackable?: boolean;
    readonly stackedByDefault?: boolean;
    readonly solo?: boolean;
    predictAxis?: (direction: any, datum: DatumDefault, seriesOptions: any) => SeriesPredictAxis<SeriesType> | undefined;
    defaultAxes?: SeriesDefaultAxes<SeriesType>;
    axisKeys?: Partial<Record<string, string>>;
    axisKeysFlipped?: Partial<Record<string, string>>;
    matchingKeys?: string[];
    options: OptionsDefs<TOptions>;
}
export interface PluginModuleDefinition<TOptions> extends ModuleDefinition<ModuleType.Plugin, TOptions> {
    readonly chartType?: string;
    patchContext?(this: void, ctx: any): void;
}
export interface AxisPluginModuleDefinition<TOptions> extends ModuleDefinition<ModuleType.AxisPlugin, TOptions> {
    readonly chartType?: string;
    readonly axisTypes?: string[];
}
export interface SeriesPluginModuleDefinition<TOptions> extends ModuleDefinition<ModuleType.SeriesPlugin, TOptions, SeriesPluginModuleInstance> {
    readonly chartType?: string;
    readonly seriesTypes?: string[];
}
