"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _link = _interopRequireDefault(require("../../../../../atom/link"));
var _learner = _interopRequireDefault(require("./learner"));
var _microlearning = _interopRequireDefault(require("./microlearning"));
var _lives = _interopRequireDefault(require("./lives"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// eslint-disable-line css-modules/no-unused-class

const HEADER_TYPE = {
  LEARNER: 'learner',
  MICROLEARNING: 'microlearning'
};
const SlidesHeader = (props = {}, context = undefined) => {
  const {
    type,
    content,
    subcontent,
    lives,
    mode
  } = props;
  return /*#__PURE__*/_react.default.createElement("div", {
    "data-name": "slidesHeader",
    className: _style.default.wrapper
  }, type === HEADER_TYPE.LEARNER ? /*#__PURE__*/_react.default.createElement(_learner.default, {
    content: content,
    subcontent: subcontent,
    mode: mode
  }) : null, type === HEADER_TYPE.MICROLEARNING ? /*#__PURE__*/_react.default.createElement(_microlearning.default, {
    content: content,
    mode: mode
  }) : null, lives ? /*#__PURE__*/_react.default.createElement(_lives.default, {
    count: lives.count
  }) : null);
};
SlidesHeader.propTypes = process.env.NODE_ENV !== "production" ? {
  type: _propTypes.default.oneOf([HEADER_TYPE.LEARNER, HEADER_TYPE.MICROLEARNING]),
  content: _propTypes.default.shape({
    href: _link.default.propTypes.href,
    title: _propTypes.default.string.isRequired,
    details: _propTypes.default.string
  }),
  subcontent: _propTypes.default.shape({
    title: _propTypes.default.string,
    details: _propTypes.default.string
  }),
  lives: _propTypes.default.shape(_lives.default.propTypes),
  mode: _propTypes.default.string
} : {};
var _default = exports.default = SlidesHeader;
//# sourceMappingURL=index.js.map