import React from 'react';
import PropTypes from 'prop-types';
import ProductCard from '../../molecule/product-card';
import Link from '../../atom/link';
import Provider from '../../atom/provider';
import PromoCode from '../../atom/promo-code';
import PaymentForm from '../../molecule/payment-form';
import style from './style.css';
const Cart = (props, context) => {
  const {
    productCardProps,
    promoCodeProps,
    paymentFormProps,
    backUrl
  } = props;
  const {
    translate
  } = context;
  return /*#__PURE__*/React.createElement("div", {
    className: style.parent
  }, /*#__PURE__*/React.createElement("div", {
    className: style.titleContainer
  }, /*#__PURE__*/React.createElement("div", {
    className: style.headerTitle
  }, translate('cart_title'))), /*#__PURE__*/React.createElement("div", {
    className: style.cart
  }, /*#__PURE__*/React.createElement("div", {
    className: style.productBlock
  }, /*#__PURE__*/React.createElement(ProductCard, productCardProps), /*#__PURE__*/React.createElement(PromoCode, promoCodeProps)), /*#__PURE__*/React.createElement("div", {
    className: style.paymentBlock
  }, /*#__PURE__*/React.createElement(PaymentForm, paymentFormProps), /*#__PURE__*/React.createElement(Link, {
    className: style.backButton,
    href: backUrl
  }, translate('back_to_catalog')))));
};
Cart.contextTypes = {
  translate: Provider.childContextTypes.translate
};
Cart.propTypes = process.env.NODE_ENV !== "production" ? {
  productCardProps: PropTypes.shape(ProductCard.propTypes),
  promoCodeProps: PropTypes.shape(PromoCode.propTypes),
  paymentFormProps: PropTypes.shape(PaymentForm.propTypes),
  backUrl: PropTypes.string
} : {};
export default Cart;
//# sourceMappingURL=index.js.map