import { buildAdvanced } from "./buildAdvanced.js";
import { buildSpec } from "./buildSpec.js";
import { build } from "./build.js";
import { intl } from "../../i18n/index.js";
import { getColorIdMap, getColorItems } from "./advanced/index.js";
class Builder {
    _vseed;
    _advancedVSeed = null;
    _spec = null;
    _performance = {};
    constructor(vseed){
        this._vseed = vseed;
        this._vseed.locale = vseed.locale || intl.getLocale();
    }
    build = ()=>build(this);
    buildSpec = (advanced)=>buildSpec(this, advanced);
    buildAdvanced = ()=>buildAdvanced(this);
    getColorItems = ()=>getColorItems(this);
    getColorIdMap = ()=>getColorIdMap(this);
    get vseed() {
        return this._vseed;
    }
    set vseed(value) {
        this._vseed = value;
    }
    get advancedVSeed() {
        return this._advancedVSeed;
    }
    set advancedVSeed(value) {
        this._advancedVSeed = value;
    }
    get spec() {
        return this._spec;
    }
    set spec(value) {
        this._spec = value;
    }
    get performance() {
        return this._performance;
    }
    set performance(value) {
        this._performance = value;
    }
    static getAdvancedPipeline = (chartType)=>{
        const customPipe = Builder._customAdvancedPipe[chartType];
        const pipeline = Builder._advancedPipelineMap[chartType];
        if (customPipe) pipeline.push(customPipe);
        return pipeline;
    };
    static getSpecPipeline = (chartType)=>{
        const customPipe = Builder._customSpecPipe[chartType];
        const pipeline = Builder._specPipelineMap[chartType];
        if (customPipe) pipeline.push(customPipe);
        return pipeline;
    };
    static getTheme = (themeKey)=>Builder._themeMap[themeKey || 'light'];
    static getThemeMap = ()=>Builder._themeMap;
    static from = (vseed)=>new Builder(vseed);
    static _advancedPipelineMap = {};
    static _specPipelineMap = {};
    static _customAdvancedPipe = {};
    static _customSpecPipe = {};
    static _themeMap = {};
}
export { Builder };

//# sourceMappingURL=builder.js.map