"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFunnelChartConfig = void 0;
const savedCharts_1 = require("../../../../../../types/savedCharts");
const getFunnelChartConfig = ({ queryTool, metricQuery, }) => {
    const { metrics } = metricQuery;
    const { chartConfig } = queryTool;
    let dataInput = savedCharts_1.FunnelChartDataInput.COLUMN;
    if (chartConfig?.funnelDataInput === 'row') {
        dataInput = savedCharts_1.FunnelChartDataInput.ROW;
    }
    return {
        type: savedCharts_1.ChartType.FUNNEL,
        config: {
            fieldId: (chartConfig?.yAxisMetrics?.[0] || metrics[0]),
            dataInput,
        },
    };
};
exports.getFunnelChartConfig = getFunnelChartConfig;
//# sourceMappingURL=funnel.js.map