"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _cta = _interopRequireDefault(require("../cta"));
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 Slide = props => {
  const {
    cover,
    title,
    subtitle,
    cta,
    light,
    alignment = 'center'
  } = props;
  const imgCover = cover;
  const ctaView = cta ? /*#__PURE__*/_react.default.createElement(_cta.default, _extends({}, cta, {
    light: light
  })) : null;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.hero,
    style: {
      backgroundImage: `url(${imgCover})`
    }
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: light ? _style.default.light : _style.default.content,
    style: {
      textAlign: alignment
    }
  }, /*#__PURE__*/_react.default.createElement("h2", {
    className: _style.default.subtitle,
    "data-name": "subtitle"
  }, subtitle), /*#__PURE__*/_react.default.createElement("h1", {
    className: _style.default.title,
    "data-name": "title"
  }, title), ctaView));
};
Slide.propTypes = process.env.NODE_ENV !== "production" ? {
  cover: _propTypes.default.string,
  title: _propTypes.default.string,
  subtitle: _propTypes.default.string,
  light: _propTypes.default.bool,
  cta: _propTypes.default.shape(_cta.default.propTypes),
  alignment: _propTypes.default.oneOf(['center', 'left', 'right'])
} : {};
var _default = exports.default = Slide;
//# sourceMappingURL=index.js.map