"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.SliStatus = void 0;
var _react = _interopRequireDefault(require("react"));
var _t = require("../../../shared/i18n/t");
var _label = require("../../labels/label");
var _sli_status_icon = require("../../sli_status_icon");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/*
 * Copyright OpenSearch Contributors
 * SPDX-License-Identifier: Apache-2.0
 */

const SliStatus = ({
  status
}) => {
  const isBreached = status === 'breached';
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_label.Label, {
    text: (0, _t.t)(`node.sliStatus.${status}`),
    className: `osd:gap-0.5 ${isBreached ? 'osd:text-faults' : 'osd:text-errors'}`,
    children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sli_status_icon.SliStatusIcon, {
      status: status,
      size: 16
    })
  });
};
exports.SliStatus = SliStatus;