import _getOr from "lodash/fp/getOr";
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import ModuleBubble from '../module-bubble';
import Provider from '../../atom/provider';
import style from './style.css';
function ModuleCard(props, context) {
  const {
    skin
  } = context;
  const {
    label,
    level,
    onClick
  } = props;
  const iconColor = _getOr('#00B0FF', ['common', 'primary'], skin);
  return /*#__PURE__*/React.createElement("div", {
    className: style.defaultStyle,
    "data-name": "module-card",
    onClick: onClick
  }, /*#__PURE__*/React.createElement("div", {
    className: classnames(style.title, style.innerHTML)
    // eslint-disable-next-line react/no-danger
    ,
    dangerouslySetInnerHTML: {
      __html: label
    }
  }), /*#__PURE__*/React.createElement("div", {
    className: style.level
  }, level), /*#__PURE__*/React.createElement("div", {
    className: style.module
  }, /*#__PURE__*/React.createElement(ModuleBubble, _extends({}, props, {
    iconColor: iconColor,
    onClick: onClick
  }))));
}
ModuleCard.propTypes = process.env.NODE_ENV !== "production" ? {
  label: PropTypes.string.isRequired,
  level: PropTypes.string.isRequired,
  onClick: PropTypes.func.isRequired
} : {};
ModuleCard.contextTypes = {
  skin: Provider.childContextTypes.skin
};
export default ModuleCard;
//# sourceMappingURL=index.js.map