"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataImportModule = void 0;
const tslib_1 = require("tslib");
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
class DataImportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
    constructor(api) {
        super(ModuleConstants.DataImportModuleId, ModuleConstants.DataImportFriendyName, 'import', 'DataImportPopup', 'Import Data', api);
    }
    createModuleMenuItem(source) {
        if (this.isModuleAvailable()) {
            return this.createDataImportMenuItem(source);
        }
    }
    createContextMenuItems() {
        if (this.isModuleAvailable()) {
            return [this.createDataImportMenuItem('ContextMenu')];
        }
        return undefined;
    }
    createColumnMenuItems() {
        if (this.isModuleAvailable()) {
            return [this.createDataImportMenuItem('ColumnMenu')];
        }
    }
    createDataImportMenuItem(source) {
        const moduleParams = {
            action: 'New',
            source: source,
            maxWidth: this.getPopupMaxWidth(),
        };
        return this.createMenuItemShowPopup('data-import', 'Import Data', this.moduleInfo.Popup, this.moduleInfo.Glyph, moduleParams);
    }
}
exports.DataImportModule = DataImportModule;
