"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ColumnInfoModule = void 0;
const tslib_1 = require("tslib");
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
class ColumnInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
    constructor(api) {
        super(ModuleConstants.ColumnInfoModuleId, ModuleConstants.ColumnInfoFriendlyName, 'columns', 'ColumnInfoPopup', 'Display information about Columns', api);
    }
    getViewAccessLevel() {
        return 'Full';
    }
    createColumnMenuItems(column) {
        if (this.isModuleVisible() && !column.isTreeColumn) {
            const columnPopUpParams = {
                source: 'ColumnMenu',
                column: column,
            };
            return [
                this.createMainMenuItemShowPopup({
                    Name: 'column-info-show',
                    Label: 'Column Info',
                    ComponentName: this.moduleInfo.Popup,
                    Icon: 'info',
                    PopupParams: columnPopUpParams,
                }),
            ];
        }
    }
    createContextMenuItems(menuContext) {
        if (this.isModuleVisible()) {
            const columnPopUpParams = {
                source: 'ColumnMenu',
                column: menuContext.adaptableColumn,
            };
            return [
                this.createMainMenuItemShowPopup({
                    Name: 'column-info-show',
                    Label: 'Column Info',
                    ComponentName: this.moduleInfo.Popup,
                    Icon: 'info',
                    PopupParams: columnPopUpParams,
                }),
            ];
        }
    }
}
exports.ColumnInfoModule = ColumnInfoModule;
