"use strict";

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

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

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var TravelNewsletter = function TravelNewsletter(props) {
  var handleChangeSubscribeEvent = props.handleChangeSubscribeEvent,
      inputEl = props.inputEl,
      handleSubscribeSite = props.handleSubscribeSite,
      emailError = props.emailError,
      userState = props.userState;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "newsletter index-section"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "container"
  }, /*#__PURE__*/_react["default"].createElement("h3", null, "Subscribe to get our best deals and promotions! "), /*#__PURE__*/_react["default"].createElement("form", {
    className: "newsletter--form"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "form-group"
  }, /*#__PURE__*/_react["default"].createElement("label", {
    htmlFor: "subscribe-email"
  }, /*#__PURE__*/_react["default"].createElement("input", {
    ref: inputEl,
    id: "subscribe-email",
    onChange: handleChangeSubscribeEvent,
    name: "subscribe-email",
    className: "form-control",
    placeholder: "Enter your email",
    type: "text"
  }), emailError && /*#__PURE__*/_react["default"].createElement("span", {
    className: "field_error"
  }, emailError), (userState === null || userState === void 0 ? void 0 : userState.successSubscribe) && /*#__PURE__*/_react["default"].createElement("span", {
    className: "field_success"
  }, userState === null || userState === void 0 ? void 0 : userState.successSubscribe))), /*#__PURE__*/_react["default"].createElement("button", {
    type: "button",
    onClick: handleSubscribeSite,
    className: "btn btn-primary"
  }, "Sign Up"))));
};

var _default = TravelNewsletter;
exports["default"] = _default;