// (C) 2021-2025 GoodData Corporation
import { BucketNames } from "@gooddata/sdk-ui";
import { PluggableComboChart } from "./PluggableComboChart.js";
import { executionConfigInsightConversion, filtersInsightConversion, getInsightToPropsConverter, getReactEmbeddingCodeGenerator, localeInsightConversion, multipleAttributesBucketConversion, multipleMeasuresBucketConversion, sortsInsightConversion, } from "../../../utils/embeddingCodeGenerator/index.js";
import { BigChartDescriptor } from "../BigChartDescriptor.js";
import { chartAdditionalFactories, chartConfigInsightConversion } from "../chartCodeGenUtils.js";
export class ComboChartDescriptor extends BigChartDescriptor {
    getFactory() {
        return (params) => new PluggableComboChart(params);
    }
    getEmbeddingCode = getReactEmbeddingCodeGenerator({
        component: {
            importType: "named",
            name: "ComboChart",
            package: "@gooddata/sdk-ui-charts",
        },
        insightToProps: getInsightToPropsConverter({
            primaryMeasures: multipleMeasuresBucketConversion("primaryMeasures", BucketNames.MEASURES),
            secondaryMeasures: multipleMeasuresBucketConversion("secondaryMeasures", BucketNames.SECONDARY_MEASURES),
            viewBy: multipleAttributesBucketConversion("viewBy", BucketNames.VIEW),
            filters: filtersInsightConversion("filters"),
            sortBy: sortsInsightConversion("sortBy"),
            config: chartConfigInsightConversion("config"),
            locale: localeInsightConversion("locale"),
            execConfig: executionConfigInsightConversion("execConfig"),
        }),
        additionalFactories: chartAdditionalFactories(),
    });
    getMeta() {
        return {
            documentationUrl: "https://www.gooddata.com/docs/gooddata-ui/latest/references/visual_components/combo_chart",
            supportsExport: true,
            supportsZooming: true,
        };
    }
}
//# sourceMappingURL=ComboChartDescriptor.js.map