import { ChartType, FunnelChartDataInput, } from '../../../../../../types/savedCharts';
export const getFunnelChartConfig = ({ queryTool, metricQuery, }) => {
    const { metrics } = metricQuery;
    const { chartConfig } = queryTool;
    let dataInput = FunnelChartDataInput.COLUMN;
    if (chartConfig?.funnelDataInput === 'row') {
        dataInput = FunnelChartDataInput.ROW;
    }
    return {
        type: ChartType.FUNNEL,
        config: {
            fieldId: (chartConfig?.yAxisMetrics?.[0] || metrics[0]),
            dataInput,
        },
    };
};
//# sourceMappingURL=funnel.js.map