var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import React from 'react';
import { ChartType } from '@reltio/mdm-sdk';
import { PieChart } from '../PieChart';
import { TreeChart } from '../TreeChart';
import { TableWithBars } from '../TableWithBars';
import { BubbleChart } from '../BubbleChart';
import { LineChart } from '../LineChart';
import { MapChart } from '../MapChart';
import { CloudChart } from '../CloudChart';
import { BasicChartsFactory } from './BasicChartsFactory';
var ChartsFactory = /** @class */ (function () {
    function ChartsFactory() {
    }
    ChartsFactory.build = function (props) {
        switch (props.chartType) {
            case ChartType.BAR:
            case ChartType.PIE:
                return BasicChartsFactory.build(props);
            case ChartType.DONUT:
                return React.createElement(PieChart, __assign({ isDonut: true }, props));
            case ChartType.TREE:
                return React.createElement(TreeChart, __assign({}, props));
            case ChartType.TABLE:
                return React.createElement(TableWithBars, __assign({}, props));
            case ChartType.BUBBLE:
                return React.createElement(BubbleChart, __assign({}, props));
            case ChartType.LINE:
                return React.createElement(LineChart, __assign({}, props));
            case ChartType.MAP:
                return React.createElement(MapChart, __assign({}, props));
            case ChartType.CLOUD:
                return React.createElement(CloudChart, __assign({}, props));
            default:
                return React.createElement("div", null);
        }
    };
    return ChartsFactory;
}());
export { ChartsFactory };
