function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React, { useContext } from 'react';
import { ProductCard } from '@pisell/materials';
import { Context } from "../../../model";
import useSelectPet from "../../../service2/hooks/useSelectPet";
import { formatProducts } from "../../../service2/utils";
var BookingList = function BookingList(_ref) {
  var items = _ref.items;
  var _useContext = useContext(Context),
    state = _useContext.state,
    dispatch = _useContext.dispatch;
  var _useSelectPet = useSelectPet(state),
    holderLists = _useSelectPet.holderLists;
  var productParams = {
    hideAddBtn: state.isTerminalDayBookingPage,
    isShowNote: false,
    isShowPackageNote: false,
    holders: holderLists,
    isEdit: false,
    disabledEdit: true
  };
  return /*#__PURE__*/React.createElement("div", {
    style: {
      display: 'flex',
      flexWrap: 'wrap',
      gap: 16
    }
  }, formatProducts(items, state, false).map(function (item, index) {
    return /*#__PURE__*/React.createElement("div", {
      style: {
        width: '100%'
      }
    }, /*#__PURE__*/React.createElement(ProductCard, _extends({
      key: item._id,
      dataSource: item
    }, productParams)));
  }));
};
export default BookingList;