"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _classnames = _interopRequireDefault(require("classnames"));
var _includes = _interopRequireDefault(require("lodash/fp/includes"));
var _novaIcons = require("@coorpacademy/nova-icons");
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const Icon = ({
  level = 0
}) => {
  switch (level) {
    case 1:
      return /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyLevel1, {
        className: _style.default.icon
      });
    case 2:
      return /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyLevel2, {
        className: _style.default.icon
      });
    case 3:
      return /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyLevel3, {
        className: _style.default.icon
      });
    default:
      return /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyLevel0, {
        className: _style.default.icon
      });
  }
};
Icon.propTypes = process.env.NODE_ENV !== "production" ? {
  level: _propTypes.default.oneOf([1, 2, 3])
} : {};
const DifficultyLevel = ({
  level,
  children
}) => /*#__PURE__*/_react.default.createElement("div", {
  className: _style.default.inlineContainer
}, /*#__PURE__*/_react.default.createElement("div", {
  className: (0, _classnames.default)({
    [_style.default.unknownContainer]: !(0, _includes.default)(level, [1, 2, 3]),
    [_style.default.easyContainer]: level === 1,
    [_style.default.normalContainer]: level === 2,
    [_style.default.hardContainer]: level === 3
  })
}, /*#__PURE__*/_react.default.createElement(Icon, {
  level: level
}), /*#__PURE__*/_react.default.createElement("span", {
  className: _style.default.text
}, children)));
DifficultyLevel.propTypes = process.env.NODE_ENV !== "production" ? {
  level: Icon.propTypes.level,
  children: _propTypes.default.string
} : {};
var _default = exports.default = DifficultyLevel;
//# sourceMappingURL=index.js.map