"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.SliStatusIcon = exports.SLI_STATUS_ICON_TEST_ID = void 0;
var _react = _interopRequireDefault(require("react"));
var _t = require("../../shared/i18n/t");
var _resources = require("../../shared/resources");
require("./sli_status_icon.scss");
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 SLI_STATUS_ICON_TEST_ID = status => `sli-status-icon-${status}`;
exports.SLI_STATUS_ICON_TEST_ID = SLI_STATUS_ICON_TEST_ID;
const SliStatusIcon = ({
  status,
  size,
  isPulsing = false
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
  "data-test-subj": SLI_STATUS_ICON_TEST_ID(status),
  className: `celSliStatusIcon cel${status.charAt(0).toUpperCase() + status.slice(1)} ${isPulsing ? 'celAnimated' : ''}`,
  style: {
    width: `${size}px`,
    height: `${size}px`
  },
  role: "img",
  "aria-label": (0, _t.t)(`sliStatus`),
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
    src: status === 'recovered' ? _resources.AlarmRecoveredIcon : _resources.AlarmIcon,
    height: size,
    width: size,
    alt: ""
  })
});
exports.SliStatusIcon = SliStatusIcon;