import * as React from 'react';
import { useAdaptable } from '../AdaptableContext';
import { getStatusItemStyle } from './Utilities/getStatusItemStyle';
import { Box } from '../../components/Flex';
export const SystemStatusStatusBarContent = () => {
    const adaptable = useAdaptable();
    const currentSystemStatusMessageInfo = adaptable.api.systemStatusApi.getCurrentSystemStatusMessageInfo();
    const { color, background } = getStatusItemStyle(currentSystemStatusMessageInfo);
    const message = currentSystemStatusMessageInfo?.statusMessage;
    return (React.createElement(Box, { style: { color: message ? color : '', backgroundColor: message ? background : '' }, className: "twa:p-1 twa:rounded-standard" }, message || '0 Messages'));
};
