import { ApiBase } from './ApiBase';
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
export class SettingsPanelApiImpl extends ApiBase {
    openSettingsPanel(moduleName) {
        if (!moduleName) {
            this.dispatchAction(PopupRedux.PopupShowScreen());
        }
        const moduleInfo = this.getAdaptableInternalApi()
            .getModuleService()
            .getModuleInfoByModule(moduleName);
        if (!moduleInfo) {
            this.logWarn(`${moduleName} module does not exist`);
        }
        this.dispatchAction(PopupRedux.PopupShowScreen(moduleName, moduleInfo?.Popup));
    }
    openCustomSettingsPanel(name) {
        this.dispatchAction(PopupRedux.PopupShowScreen(null, name));
    }
    closeSettingsPanel() {
        this.dispatchAction(PopupRedux.PopupHideScreen());
    }
}
