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 CMPopin from '../../../molecule/cm-popin';
import SlidesPlayer from './slides';
import style from './style.css';
const SlidePlayer = props => {
  const {
    player,
    popin
  } = props;
  const backgroundImage = player.backgroundUrl ? `url(${player.backgroundUrl})` : null;
  return /*#__PURE__*/React.createElement("div", {
    "data-name": "slidePlayer",
    className: style.wrapper
  }, /*#__PURE__*/React.createElement("div", {
    className: style.playerWrapper
  }, /*#__PURE__*/React.createElement("div", {
    className: style.playerBackground,
    style: {
      backgroundImage
    }
  }), /*#__PURE__*/React.createElement(SlidesPlayer, _extends({}, player, {
    popinError: popin
  })), popin ? /*#__PURE__*/React.createElement(CMPopin, popin) : null));
};
SlidePlayer.propTypes = process.env.NODE_ENV !== "production" ? {
  player: PropTypes.shape(SlidesPlayer.propTypes),
  popin: PropTypes.shape(CMPopin.propTypes)
} : {};
export default SlidePlayer;
//# sourceMappingURL=index.js.map