"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SystemStatusInternalApi = void 0;
const tslib_1 = require("tslib");
const ApiBase_1 = require("../Implementation/ApiBase");
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
class SystemStatusInternalApi extends ApiBase_1.ApiBase {
    /**
     * Fires SystemStatusMessageDisplayed Event
     * @param systemStatusMessageInfo Info about new System Status Message
     */
    fireSystemStatusMessageDisplayedEvent(systemStatusMessageInfo) {
        const systemStatusMessageDisplayedInfo = Object.assign({ systemStatusMessageInfo: systemStatusMessageInfo }, this.getAdaptableInternalApi().buildBaseContext());
        this.getEventApi().emit('SystemStatusMessageDisplayed', systemStatusMessageDisplayedInfo);
    }
    addSystemStatusMessageInfo(systemStatusMessageInfo) {
        const maxMessagesInStore = this.getNotificationsOptions().maxSystemMessagesInStore;
        this.dispatchAction(SystemRedux.SystemStatusMessageInfoAdd(systemStatusMessageInfo, maxMessagesInStore));
    }
    getSystemStatusMessageInfos() {
        return this.getAdaptableState().System.SystemStatusMessages;
    }
}
exports.SystemStatusInternalApi = SystemStatusInternalApi;
