"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SystemStatusStatusBarContent = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const AdaptableContext_1 = require("../AdaptableContext");
const getStatusItemStyle_1 = require("./Utilities/getStatusItemStyle");
const Flex_1 = require("../../components/Flex");
const SystemStatusStatusBarContent = () => {
    const adaptable = (0, AdaptableContext_1.useAdaptable)();
    const currentSystemStatusMessageInfo = adaptable.api.systemStatusApi.getCurrentSystemStatusMessageInfo();
    const { color, background } = (0, getStatusItemStyle_1.getStatusItemStyle)(currentSystemStatusMessageInfo);
    const message = currentSystemStatusMessageInfo?.statusMessage;
    return (React.createElement(Flex_1.Box, { style: { color: message ? color : '', backgroundColor: message ? background : '' }, className: "twa:p-1 twa:rounded-standard" }, message || '0 Messages'));
};
exports.SystemStatusStatusBarContent = SystemStatusStatusBarContent;
