Liferay.Loader.define("commerce-frontend-js@4.0.75/components/mini_cart/CartItemsList",["module","exports","require","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$react","./CartQuickAdd","./MiniCartContext","./util/constants"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function CartItemsList(){const{CartViews:e,cartState:t,isUpdating:r,labels:l,setCartState:u,summaryDataMapper:s}=(0,n.useContext)(c.default),{cartItems:d=[],id:f,summary:p={}}=t;return n.default.createElement("div",{className:"mini-cart-items-list"},n.default.createElement(e.ItemsListActions,null),t.accountId&&!!f&&n.default.createElement(i.default,null),d.length?n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{className:"mini-cart-cart-items"},d.map(((t,r)=>n.default.createElement(e.Item,_extends({index:r,key:t.id,updateCartItem:e=>{const r=e(t);u((e=>_objectSpread(_objectSpread({},e),{},{cartItems:d.map((e=>e.id===t.id?r:e))})))}},t))))),n.default.createElement(e.Summary,{dataMapper:s,isLoading:r,summaryData:p})):n.default.createElement("div",{className:"empty-cart"},n.default.createElement("div",{className:"empty-cart-icon mb-3"},n.default.createElement(a.default,{symbol:"shopping-cart"})),n.default.createElement("p",{className:"empty-cart-label"},l[o.ADD_PRODUCT])))};var a=_interopRequireDefault(r("@frontend-taglib-clay$clayui/icon")),n=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=a?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(r,n,i):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),i=_interopRequireDefault(r("./CartQuickAdd")),c=_interopRequireDefault(r("./MiniCartContext")),o=r("./util/constants");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}}}));
//# sourceMappingURL=CartItemsList.js.map