import { HashMap } from 'zrender/lib/core/util';
import Model from './Model';
import ComponentModel from './Component';
import { ColorPaletteMixin } from './mixin/colorPalette';
import SeriesModel from './Series';
import { Payload, OptionPreprocessor, ECOption, ECUnitOption, ComponentMainType, ComponentSubType } from '../util/types';
import OptionManager from './OptionManager';
import Scheduler from '../stream/Scheduler';
import { LocaleOption } from '../locale';
export interface GlobalModelSetOptionOpts {
    replaceMerge: ComponentMainType | ComponentMainType[];
}
export interface InnerSetOptionOpts {
    replaceMergeMainTypeMap: HashMap<boolean, string>;
}
declare class GlobalModel extends Model<ECUnitOption> {
    option: ECUnitOption;
    private _theme;
    private _locale;
    private _optionManager;
    private _componentsMap;
    private _componentsCount;
    private _seriesIndices;
    private _seriesIndicesMap;
    private _payload;
    scheduler: Scheduler;
    init(option: ECOption, parentModel: Model, ecModel: GlobalModel, theme: object, locale: object, optionManager: OptionManager): void;
    setOption(option: ECOption, opts: GlobalModelSetOptionOpts, optionPreprocessorFuncs: OptionPreprocessor[]): void;
    resetOption(type: 'recreate' | 'timeline' | 'media', opt?: GlobalModelSetOptionOpts): boolean;
    private _resetOption;
    mergeOption(option: ECUnitOption): void;
    private _mergeOption;
    getOption(): ECUnitOption;
    getTheme(): Model;
    getLocaleModel(): Model<LocaleOption>;
    getLocale(localePosition: Parameters<Model<LocaleOption>['get']>[0]): any;
    setUpdatePayload(payload: Payload): void;
    getUpdatePayload(): Payload;
    getComponent(mainType: ComponentMainType, idx?: number): ComponentModel;
    queryComponents(condition: QueryConditionKindB): ComponentModel[];
    findComponents(condition: QueryConditionKindA): ComponentModel[];
    eachComponent<T>(cb: EachComponentAllCallback, context?: T): void;
    eachComponent<T>(mainType: string, cb: EachComponentInMainTypeCallback, context?: T): void;
    eachComponent<T>(mainType: QueryConditionKindA, cb: EachComponentInMainTypeCallback, context?: T): void;
    getSeriesByName(name: string): SeriesModel[];
    getSeriesByIndex(seriesIndex: number): SeriesModel;
    getSeriesByType(subType: ComponentSubType): SeriesModel[];
    getSeries(): SeriesModel[];
    getSeriesCount(): number;
    eachSeries<T>(cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => void, context?: T): void;
    eachRawSeries<T>(cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => void, context?: T): void;
    eachSeriesByType<T>(subType: ComponentSubType, cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => void, context?: T): void;
    eachRawSeriesByType<T>(subType: ComponentSubType, cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => void, context?: T): void;
    isSeriesFiltered(seriesModel: SeriesModel): boolean;
    getCurrentSeriesIndices(): number[];
    filterSeries<T>(cb: (this: T, series: SeriesModel, rawSeriesIndex: number) => boolean, context?: T): void;
    restoreData(payload?: Payload): void;
    private static internalField;
}
export interface QueryConditionKindA {
    mainType: ComponentMainType;
    subType?: ComponentSubType;
    query?: {
        [k: string]: number | number[] | string | string[];
    };
    filter?: (cmpt: ComponentModel) => boolean;
}
export interface QueryConditionKindB {
    mainType: ComponentMainType;
    subType?: ComponentSubType;
    index?: number | number[];
    id?: string | number | (string | number)[];
    name?: (string | number) | (string | number)[];
}
export interface EachComponentAllCallback {
    (mainType: string, model: ComponentModel, componentIndex: number): void;
}
interface EachComponentInMainTypeCallback {
    (model: ComponentModel, componentIndex: number): void;
}
interface GlobalModel extends ColorPaletteMixin<ECUnitOption> {
}
export default GlobalModel;
