"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.InfiniteScrollLoaderBase = void 0;
var _react = _interopRequireDefault(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/InfiniteScrollLoader/InfiniteScrollLoaderBase.tsx";
const InfiniteScrollLoaderBase = exports.InfiniteScrollLoaderBase = (0, _mobxReactLite.observer)(function InfiniteScrollLoaderBase({
  state,
  targetRef,
  children
}) {
  const {
    fetchedLastPage,
    showRefreshLoader,
    showErrorState
  } = state;
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
    ref: el => {
      targetRef.current = el;
    },
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 23,
      columnNumber: 9
    }
  }), !fetchedLastPage && !showRefreshLoader && !showErrorState && children);
});
//# sourceMappingURL=InfiniteScrollLoaderBase.js.map