import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["title", "subTitle", "image", "children", "className"];
import React from 'react';
import PropTypes from 'prop-types';
import Button from '../Button';
import Wrapper from '../Wrapper';
import { settings } from '../../globals/js';
var prefix = settings.prefix;

var HeroExternal = function HeroExternal(_ref) {
  var title = _ref.title,
      subTitle = _ref.subTitle,
      image = _ref.image,
      children = _ref.children,
      className = _ref.className,
      other = _objectWithoutProperties(_ref, _excluded);

  var wrapperClasses = classNames("".concat(prefix, "--hero-ext"), _defineProperty({}, "".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.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.createElement(Wrapper, {
      pageWidth: "md"
    }, /*#__PURE__*/React.createElement("div", {
      className: "".concat(prefix, "--hero-ext__content")
    }, title && /*#__PURE__*/React.createElement("h1", {
      className: "".concat(prefix, "--hero-ext__heading")
    }, title), subTitle && /*#__PURE__*/React.createElement("p", {
      className: "".concat(prefix, "--hero-ext__body-copy")
    }, subTitle)), children))
  );
};

HeroExternal.propTypes = {
  title: PropTypes.node,
  subTitle: PropTypes.node,
  image: PropTypes.string,
  children: PropTypes.node,
  className: PropTypes.string
};
export default HeroExternal;