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 { NovaCompositionNavigationArrowLeft as BackIcon } from '@coorpacademy/nova-icons';
import Link from '../../../../../atom/link';
import style from './microlearning.css';
const Content = ({
  onClick,
  title,
  mode
}, context) => {
  const content = /*#__PURE__*/React.createElement("div", {
    "data-name": "contentTitle",
    className: classnames(style.contentTitle, style.innerHTML)
    // eslint-disable-next-line react/no-danger
    ,
    dangerouslySetInnerHTML: {
      __html: title
    }
  });
  if (mode === 'scorm') return /*#__PURE__*/React.createElement("div", {
    className: style.contentScorm
  }, /*#__PURE__*/React.createElement("div", {
    className: style.backIcon
  }), content);
  return /*#__PURE__*/React.createElement(Link, {
    onClick: onClick,
    className: style.content
  }, /*#__PURE__*/React.createElement(BackIcon, {
    className: style.backIcon
  }), content);
};
Content.propTypes = process.env.NODE_ENV !== "production" ? {
  onClick: Link.propTypes.onClick,
  title: PropTypes.node,
  mode: PropTypes.string
} : {};
const MicrolearningHeader = (props, context) => {
  const {
    content,
    mode
  } = props;
  return /*#__PURE__*/React.createElement(Content, _extends({}, content, {
    mode: mode
  }));
};
MicrolearningHeader.propTypes = process.env.NODE_ENV !== "production" ? {
  content: PropTypes.shape({
    onClick: Link.propTypes.onClick,
    title: PropTypes.string.isRequired
  }),
  mode: PropTypes.string
} : {};
export default MicrolearningHeader;
//# sourceMappingURL=microlearning.js.map