"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.PickerContentV2 = PickerContentV2;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _PickerContentProvider = require("./PickerContentProvider");
var _MaxSelection = require("../MaxSelection");
var _PickerListContent = require("../PickerListContent");
var _PickerTableListItem = require("../PickerTableListItem");
var _PickerContentWrapped = require("./PickerContentWrapped");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/PickerContent/PickerContentV2.tsx";
function PickerContentV2(props) {
  const {
    modalState
  } = props;
  return (
    /*#__PURE__*/
    // wrap with a new WixPatternsContainer that can get initialProps
    _react.default.createElement(_PickerContentProvider.PickerContentProvider, {
      modalState: modalState,
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 17,
        columnNumber: 5
      }
    }, /*#__PURE__*/_react.default.createElement(_PickerContentWrapped.PickerContentWrapped, (0, _extends2.default)({}, props, {
      renderPickerContent: ({
        state,
        renderItem
      }) => /*#__PURE__*/_react.default.createElement(_PickerListContent.PickerListContent, (0, _extends2.default)({}, props.selectorListProps, {
        state: state.picker,
        multiple: (0, _MaxSelection.fromMultipleSelectionToBoolean)(props.multiple),
        renderItem: (keyedItem, index) => /*#__PURE__*/_react.default.createElement(_PickerTableListItem.PickerTableListItem, (0, _extends2.default)({}, renderItem == null ? void 0 : renderItem(keyedItem.item, index), {
          state: state.picker,
          keyedItem: keyedItem,
          __self: this,
          __source: {
            fileName: _jsxFileName,
            lineNumber: 26,
            columnNumber: 15
          }
        })),
        __self: this,
        __source: {
          fileName: _jsxFileName,
          lineNumber: 21,
          columnNumber: 11
        }
      })),
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 18,
        columnNumber: 7
      }
    })))
  );
}
//# sourceMappingURL=PickerContentV2.js.map