import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import includes from 'lodash/fp/includes';
import { NovaCompositionCoorpacademyLevel0, NovaCompositionCoorpacademyLevel1, NovaCompositionCoorpacademyLevel2, NovaCompositionCoorpacademyLevel3 } from '@coorpacademy/nova-icons';
import style from './style.css';
const Icon = ({
  level = 0
}) => {
  switch (level) {
    case 1:
      return /*#__PURE__*/React.createElement(NovaCompositionCoorpacademyLevel1, {
        className: style.icon
      });
    case 2:
      return /*#__PURE__*/React.createElement(NovaCompositionCoorpacademyLevel2, {
        className: style.icon
      });
    case 3:
      return /*#__PURE__*/React.createElement(NovaCompositionCoorpacademyLevel3, {
        className: style.icon
      });
    default:
      return /*#__PURE__*/React.createElement(NovaCompositionCoorpacademyLevel0, {
        className: style.icon
      });
  }
};
Icon.propTypes = process.env.NODE_ENV !== "production" ? {
  level: PropTypes.oneOf([1, 2, 3])
} : {};
const DifficultyLevel = ({
  level,
  children
}) => /*#__PURE__*/React.createElement("div", {
  className: style.inlineContainer
}, /*#__PURE__*/React.createElement("div", {
  className: classnames({
    [style.unknownContainer]: !includes(level, [1, 2, 3]),
    [style.easyContainer]: level === 1,
    [style.normalContainer]: level === 2,
    [style.hardContainer]: level === 3
  })
}, /*#__PURE__*/React.createElement(Icon, {
  level: level
}), /*#__PURE__*/React.createElement("span", {
  className: style.text
}, children)));
DifficultyLevel.propTypes = process.env.NODE_ENV !== "production" ? {
  level: Icon.propTypes.level,
  children: PropTypes.string
} : {};
export default DifficultyLevel;
//# sourceMappingURL=index.js.map