"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _cmPopin = _interopRequireDefault(require("../../../molecule/cm-popin"));
var _slides = _interopRequireDefault(require("./slides"));
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 SlidePlayer = props => {
  const {
    player,
    popin
  } = props;
  const backgroundImage = player.backgroundUrl ? `url(${player.backgroundUrl})` : null;
  return /*#__PURE__*/_react.default.createElement("div", {
    "data-name": "slidePlayer",
    className: _style.default.wrapper
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.playerWrapper
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.playerBackground,
    style: {
      backgroundImage
    }
  }), /*#__PURE__*/_react.default.createElement(_slides.default, _extends({}, player, {
    popinError: popin
  })), popin ? /*#__PURE__*/_react.default.createElement(_cmPopin.default, popin) : null));
};
SlidePlayer.propTypes = process.env.NODE_ENV !== "production" ? {
  player: _propTypes.default.shape(_slides.default.propTypes),
  popin: _propTypes.default.shape(_cmPopin.default.propTypes)
} : {};
var _default = exports.default = SlidePlayer;
//# sourceMappingURL=index.js.map