"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _productCard = _interopRequireDefault(require("../../molecule/product-card"));
var _link = _interopRequireDefault(require("../../atom/link"));
var _provider = _interopRequireDefault(require("../../atom/provider"));
var _promoCode = _interopRequireDefault(require("../../atom/promo-code"));
var _paymentForm = _interopRequireDefault(require("../../molecule/payment-form"));
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const Cart = (props, context) => {
  const {
    productCardProps,
    promoCodeProps,
    paymentFormProps,
    backUrl
  } = props;
  const {
    translate
  } = context;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.parent
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.titleContainer
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.headerTitle
  }, translate('cart_title'))), /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.cart
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.productBlock
  }, /*#__PURE__*/_react.default.createElement(_productCard.default, productCardProps), /*#__PURE__*/_react.default.createElement(_promoCode.default, promoCodeProps)), /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.paymentBlock
  }, /*#__PURE__*/_react.default.createElement(_paymentForm.default, paymentFormProps), /*#__PURE__*/_react.default.createElement(_link.default, {
    className: _style.default.backButton,
    href: backUrl
  }, translate('back_to_catalog')))));
};
Cart.contextTypes = {
  translate: _provider.default.childContextTypes.translate
};
Cart.propTypes = process.env.NODE_ENV !== "production" ? {
  productCardProps: _propTypes.default.shape(_productCard.default.propTypes),
  promoCodeProps: _propTypes.default.shape(_promoCode.default.propTypes),
  paymentFormProps: _propTypes.default.shape(_paymentForm.default.propTypes),
  backUrl: _propTypes.default.string
} : {};
var _default = exports.default = Cart;
//# sourceMappingURL=index.js.map