"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _Button = _interopRequireDefault(require("../Button"));

var _Wrapper = _interopRequireDefault(require("../Wrapper"));

var _js = require("../../globals/js");

var _excluded = ["title", "subTitle", "image", "children", "className"];
var prefix = _js.settings.prefix;

var HeroExternal = function HeroExternal(_ref) {
  var title = _ref.title,
      subTitle = _ref.subTitle,
      image = _ref.image,
      children = _ref.children,
      className = _ref.className,
      other = (0, _objectWithoutProperties2.default)(_ref, _excluded);
  var wrapperClasses = classNames("".concat(prefix, "--hero-ext"), (0, _defineProperty2.default)({}, "".concat(className), className));
  return (
    /*#__PURE__*/
    // TODO: Provide a prop to set the backgrond image (linear-gradient should be not editable)
    // TODO: Provide a prop [string] to set the backgrond position (optional).
    _react.default.createElement("div", {
      className: wrapperClasses // TODO: do we need a token for the linear gradient?
      ,
      style: {
        backgroundImage: "linear-gradient(rgba(26, 66, 98, 0.8), rgba(26, 66, 98, 0.8)), url(".concat(image, ")"),
        backgroundPosition: 'center right'
      }
    }, /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
      pageWidth: "md"
    }, /*#__PURE__*/_react.default.createElement("div", {
      className: "".concat(prefix, "--hero-ext__content")
    }, title && /*#__PURE__*/_react.default.createElement("h1", {
      className: "".concat(prefix, "--hero-ext__heading")
    }, title), subTitle && /*#__PURE__*/_react.default.createElement("p", {
      className: "".concat(prefix, "--hero-ext__body-copy")
    }, subTitle)), children))
  );
};

HeroExternal.propTypes = {
  title: _propTypes.default.node,
  subTitle: _propTypes.default.node,
  image: _propTypes.default.string,
  children: _propTypes.default.node,
  className: _propTypes.default.string
};
var _default = HeroExternal;
exports.default = _default;