"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SettingsPanelModule = void 0;
const tslib_1 = require("tslib");
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
const PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux"));
class SettingsPanelModule extends AdaptableModuleBase_1.AdaptableModuleBase {
    constructor(api) {
        const friendlyName = api.optionsApi.getSettingsPanelOptions().title;
        super(ModuleConstants.SettingsPanelModuleId, friendlyName, 'settings', null, 'Manage all Adaptable Settings', api);
    }
    createColumnMenuItems(column) {
        return [
            // To do : get the icon and name from settings in case they have changed?
            this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
        ];
    }
    createContextMenuItems(menuContext) {
        return [
            this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen()),
        ];
    }
    createModuleMenuItem(source) {
        if (this.isModuleVisible()) {
            return this.createMenuItemReduxAction('settings-panel-open', 'Open ' + this.moduleInfo.FriendlyName, this.moduleInfo.Glyph, PopupRedux.PopupShowScreen());
        }
    }
}
exports.SettingsPanelModule = SettingsPanelModule;
