"use strict";

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

exports.__esModule = true;
exports.ProductsList = void 0;

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

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

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _lib = require("@sentecacommerce-theme/lib");

var _Components = require("./Components");

var _templateObject, _templateObject2;

var ProductsList = function ProductsList(_ref) {
  var errorRef = _ref.errorRef;

  var _useBasketItemList = (0, _lib.useBasketItemList)(),
      lineItems = _useBasketItemList.lineItems,
      customLineItems = _useBasketItemList.customLineItems;

  return /*#__PURE__*/_react["default"].createElement(Container, null, /*#__PURE__*/_react["default"].createElement(Inner, null, lineItems == null ? void 0 : lineItems.map(function (item) {
    return /*#__PURE__*/_react["default"].createElement(_Components.Product, {
      errorRef: errorRef,
      item: item,
      key: item._id
    });
  }), customLineItems == null ? void 0 : customLineItems.map(function (item) {
    return /*#__PURE__*/_react["default"].createElement(_Components.CustomProduct, {
      item: item,
      key: item._id
    });
  })));
};

exports.ProductsList = ProductsList;

var Container = _styledComponents["default"].div.attrs({
  className: 'mb-3'
})(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2["default"])([""])));

var Inner = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2["default"])(["\n  box-shadow: rgb(229, 229, 229) 0px 1px 0px 0px inset;\n\n  @media only screen and (min-width: ", ") {\n    box-shadow: none;\n  }\n"])), function (_ref2) {
  var theme = _ref2.theme;
  return theme.breakpoints.lg.min;
});
//# sourceMappingURL=index.js.map