import _getOr from "lodash/fp/getOr";
import React from 'react';
import PropTypes from 'prop-types';
import Provider from '../../atom/provider';
import style from './style.css';
const DisciplineCTA = (props, context) => {
  const {
    skin
  } = context;
  const {
    startLabel,
    buyLabel,
    start,
    buy
  } = props;
  const startLearning = /*#__PURE__*/React.createElement("span", {
    // eslint-disable-next-line react/no-danger
    dangerouslySetInnerHTML: {
      __html: startLabel
    }
  });
  const premium = /*#__PURE__*/React.createElement("span", {
    // eslint-disable-next-line react/no-danger
    dangerouslySetInnerHTML: {
      __html: buyLabel
    }
  });
  const startColor = _getOr('#f0f', 'common.primary', skin);
  const startButton = start ? /*#__PURE__*/React.createElement("a", {
    "data-name": "start",
    className: style.start,
    onClick: start,
    style: {
      backgroundColor: startColor
    }
  }, startLearning) : null;
  const buyButton = buy ? /*#__PURE__*/React.createElement("a", {
    "data-name": "buy",
    className: style.buy,
    onClick: buy
  }, premium) : null;
  return /*#__PURE__*/React.createElement("div", {
    "data-name": "disciplineCta",
    className: style.head
  }, startButton, buyButton);
};
DisciplineCTA.contextTypes = {
  skin: Provider.childContextTypes.skin
};
DisciplineCTA.propTypes = process.env.NODE_ENV !== "production" ? {
  startLabel: PropTypes.string,
  buyLabel: PropTypes.string,
  start: PropTypes.func,
  buy: PropTypes.func
} : {};
export default DisciplineCTA;
//# sourceMappingURL=index.js.map