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 Cta from '../cta';
import style from './style.css';
const Slide = props => {
  const {
    cover,
    title,
    subtitle,
    cta,
    light,
    alignment = 'center'
  } = props;
  const imgCover = cover;
  const ctaView = cta ? /*#__PURE__*/React.createElement(Cta, _extends({}, cta, {
    light: light
  })) : null;
  return /*#__PURE__*/React.createElement("div", {
    className: style.hero,
    style: {
      backgroundImage: `url(${imgCover})`
    }
  }, /*#__PURE__*/React.createElement("div", {
    className: light ? style.light : style.content,
    style: {
      textAlign: alignment
    }
  }, /*#__PURE__*/React.createElement("h2", {
    className: style.subtitle,
    "data-name": "subtitle"
  }, subtitle), /*#__PURE__*/React.createElement("h1", {
    className: style.title,
    "data-name": "title"
  }, title), ctaView));
};
Slide.propTypes = process.env.NODE_ENV !== "production" ? {
  cover: PropTypes.string,
  title: PropTypes.string,
  subtitle: PropTypes.string,
  light: PropTypes.bool,
  cta: PropTypes.shape(Cta.propTypes),
  alignment: PropTypes.oneOf(['center', 'left', 'right'])
} : {};
export default Slide;
//# sourceMappingURL=index.js.map