"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _header = _interopRequireDefault(require("../player/slides/header"));
var _cmPopin = _interopRequireDefault(require("../../../molecule/cm-popin"));
var _summary = _interopRequireDefault(require("./summary"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
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); }
const Content = props => {
  const {
    mode = 'default'
  } = props;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: mode !== 'scorm' ? _style.default.popinWrapper : null
  }, /*#__PURE__*/_react.default.createElement(_summary.default, props));
};
Content.propTypes = process.env.NODE_ENV !== "production" ? {
  mode: _propTypes.default.oneOf(['scorm', 'default'])
} : {};
const PopinEnd = props => {
  const {
    header,
    summary,
    mode = 'default',
    popinError
  } = props;
  return /*#__PURE__*/_react.default.createElement("div", {
    "data-name": "popinEnd",
    className: _style.default.wrapper
  }, popinError ? /*#__PURE__*/_react.default.createElement(_cmPopin.default, popinError) : null, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.slidesHeader
  }, /*#__PURE__*/_react.default.createElement(_header.default, header)), /*#__PURE__*/_react.default.createElement(Content, _extends({}, summary, {
    mode: mode
  })));
};
PopinEnd.propTypes = process.env.NODE_ENV !== "production" ? {
  header: _propTypes.default.shape(_header.default.propTypes),
  summary: _propTypes.default.shape(_summary.default.propTypes),
  mode: _propTypes.default.oneOf(['scorm', 'default']),
  popinError: _propTypes.default.shape(_cmPopin.default.propTypes)
} : {};
var _default = exports.default = PopinEnd;
//# sourceMappingURL=index.js.map