"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get EXPORT_TYPES () {
        return EXPORT_TYPES;
    },
    get TYPE_CSV () {
        return TYPE_CSV;
    },
    get TYPE_PDF () {
        return TYPE_PDF;
    },
    get TYPE_XLSX () {
        return TYPE_XLSX;
    },
    get /**
 * @private
 * @param {string} type The exporter type.
 * @param {DataProvider} dataProvider The data provider.
 * @param {object} options Constructor options for exporter class.
 * @returns {BaseType|null}
 */ default () {
        return typeFactory;
    }
});
const _csv = /*#__PURE__*/ _interop_require_default(require("./types/csv"));
const _xlsx = /*#__PURE__*/ _interop_require_default(require("./types/xlsx"));
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const TYPE_CSV = 'csv';
const TYPE_XLSX = 'xlsx';
const TYPE_PDF = 'pdf'; // TODO
const EXPORT_TYPES = {
    [TYPE_CSV]: _csv.default,
    [TYPE_XLSX]: _xlsx.default
};
function typeFactory(type, dataProvider, options) {
    if (typeof EXPORT_TYPES[type] === 'function') {
        return new EXPORT_TYPES[type](dataProvider, options);
    }
    return null;
}
