"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.GridPlaceholderStates = void 0;
var _react = _interopRequireDefault(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _PlaceholderStatesBase = require("../PlaceholderStates/PlaceholderStatesBase");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/Grid/GridPlaceholderStates.tsx";
function _GridPlaceholderStates(props) {
  const {
    state,
    emptyState,
    noResultsState,
    errorState,
    children
  } = props;
  const {
    collection
  } = state;
  return /*#__PURE__*/_react.default.createElement(_PlaceholderStatesBase.PlaceholderStatesBase, {
    state: state.multi,
    emptyState: emptyState,
    noResultsState: typeof noResultsState === 'function' ? () => {
      const {
        result: {
          originQuery,
          hasAvailableItems
        }
      } = collection;
      return noResultsState({
        hasAvailableItems,
        query: originQuery
      });
    } : noResultsState,
    errorState: errorState,
    loadingState: null,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 19,
      columnNumber: 5
    }
  }, children);
}
const GridPlaceholderStates = exports.GridPlaceholderStates = (0, _mobxReactLite.observer)(_GridPlaceholderStates);
//# sourceMappingURL=GridPlaceholderStates.js.map