Liferay.Loader.define("portal-workflow-metrics-web@2.0.46/js/components/instance-list-page/modal/shared/select-tasks-step/SelectTasksStepBody.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/modal', 'frontend-js-react-web$react', '../../../../../shared/components/content-view/ContentView.es', '../../../../../shared/components/list/RetryButton.es', '../../../../../shared/components/pagination-bar/PaginationBar.es', './SelectTasksStepTable.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Body = void 0;

    var _modal = _interopRequireDefault(require("@frontend-taglib-clay$clayui/modal"));

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

    var _ContentView = _interopRequireDefault(require("../../../../../shared/components/content-view/ContentView.es"));

    var _RetryButton = _interopRequireDefault(require("../../../../../shared/components/list/RetryButton.es"));

    var _PaginationBar = _interopRequireDefault(require("../../../../../shared/components/pagination-bar/PaginationBar.es"));

    var _SelectTasksStepTable = require("./SelectTasksStepTable.es");

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    function _extends() {
      _extends = Object.assign || 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);
    }

    var Body = function Body(_ref) {
      var filtered = _ref.filtered,
          items = _ref.items,
          pagination = _ref.pagination,
          setRetry = _ref.setRetry,
          totalCount = _ref.totalCount;
      var statesProps = {
        emptyProps: {
          className: 'py-4',
          filtered: filtered,
          messageClassName: 'small'
        },
        errorProps: {
          actionButton: /*#__PURE__*/_react.default.createElement(_RetryButton.default, {
            onClick: function onClick() {
              return setRetry(function (retry) {
                return retry + 1;
              });
            }
          }),
          className: 'mt-5 py-8',
          hideAnimation: true,
          message: Liferay.Language.get('unable-to-retrieve-data'),
          messageClassName: 'small'
        },
        loadingProps: {
          className: 'mt-5 py-8'
        }
      };
      return (/*#__PURE__*/_react.default.createElement(_modal.default.Body, null, /*#__PURE__*/_react.default.createElement(_ContentView.default, statesProps, totalCount > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Body.Table, {
          items: items,
          totalCount: totalCount
        }), /*#__PURE__*/_react.default.createElement(_PaginationBar.default, _extends({}, pagination, {
          withoutRouting: true
        })))))
      );
    };

    exports.Body = Body;
    Body.Table = _SelectTasksStepTable.Table;
    //# sourceMappingURL=SelectTasksStepBody.es.js.map
  }
});
//# sourceMappingURL=SelectTasksStepBody.es.js.map