Liferay.Loader.define("portal-workflow-metrics-web@2.0.59/js/components/instance-list-page/InstanceListPageTable.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/table', 'frontend-js-react-web$react', '../../shared/hooks/useIsAdmin.es', './InstanceListPageItem.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Table = void 0;

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

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

    var _useIsAdmin2 = require("../../shared/hooks/useIsAdmin.es");

    var _InstanceListPageItem = require("./InstanceListPageItem.es");

    function _getRequireWildcardCache() {
      if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {
        return cache;
      };return cache;
    }

    function _interopRequireWildcard(obj) {
      if (obj && obj.__esModule) {
        return obj;
      }if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
        return { default: obj };
      }var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {
        return cache.get(obj);
      }var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {
        if (Object.prototype.hasOwnProperty.call(obj, key)) {
          var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {
            Object.defineProperty(newObj, key, desc);
          } else {
            newObj[key] = obj[key];
          }
        }
      }newObj.default = obj;if (cache) {
        cache.set(obj, newObj);
      }return newObj;
    }

    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 Table = function Table(_ref) {
      var items = _ref.items,
          totalCount = _ref.totalCount;

      var _useIsAdmin = (0, _useIsAdmin2.useIsAdmin)(),
          fetchData = _useIsAdmin.fetchData,
          isAdmin = _useIsAdmin.isAdmin;

      (0, _react.useEffect)(function () {
        fetchData(); // eslint-disable-next-line react-hooks/exhaustive-deps
      }, []);
      return (/*#__PURE__*/_react.default.createElement(_table.default, null, /*#__PURE__*/_react.default.createElement(_table.default.Head, null, /*#__PURE__*/_react.default.createElement(_table.default.Row, null, /*#__PURE__*/_react.default.createElement(_table.default.Cell, {
          headingCell: true,
          style: {
            width: '7%'
          }
        }), /*#__PURE__*/_react.default.createElement(_table.default.Cell, {
          headingCell: true,
          style: {
            width: '8%'
          }
        }, Liferay.Language.get('id')), /*#__PURE__*/_react.default.createElement(_table.default.Cell, {
          headingCell: true,
          style: {
            width: '17%'
          }
        }, Liferay.Language.get('item-subject')), /*#__PURE__*/_react.default.createElement(_table.default.Cell, {
          headingCell: true,
          style: {
            width: '18%'
          }
        }, Liferay.Language.get('process-step')), /*#__PURE__*/_react.default.createElement(_table.default.Cell, {
          headingCell: true,
          style: {
            width: '14%'
          }
        }, Liferay.Language.get('assignee')), /*#__PURE__*/_react.default.createElement(_table.default.Cell, {
          headingCell: true,
          style: {
            width: '17%'
          }
        }, Liferay.Language.get('created-by')), /*#__PURE__*/_react.default.createElement(_table.default.Cell, {
          headingCell: true,
          style: {
            width: '18%'
          }
        }, Liferay.Language.get('creation-date')), /*#__PURE__*/_react.default.createElement(_table.default.Cell, {
          headingCell: true,
          style: {
            width: '5%'
          }
        }))), /*#__PURE__*/_react.default.createElement(_table.default.Body, null, items.map(function (item, index) {
          return (/*#__PURE__*/_react.default.createElement(Table.Item, _extends({}, item, {
              isAdmin: isAdmin,
              key: index,
              totalCount: totalCount
            }))
          );
        })))
      );
    };

    exports.Table = Table;
    Table.Item = _InstanceListPageItem.Item;
    //# sourceMappingURL=InstanceListPageTable.es.js.map
  }
});
//# sourceMappingURL=InstanceListPageTable.es.js.map