Liferay.Loader.define("portal-workflow-metrics-web@2.0.46/js/components/performance-by-assignee-page/PerformanceByAssigneePageHeader.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/management-toolbar', 'frontend-js-react-web$react', '../../shared/components/filter/util/filterConstants.es', '../../shared/components/results-bar/ResultsBar.es', '../../shared/components/search-field/SearchField.es', '../filter/ProcessStepFilter.es', '../filter/RoleFilter.es', '../filter/TimeRangeFilter.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Header = void 0;

    var _managementToolbar = _interopRequireDefault(require("@frontend-taglib-clay$clayui/management-toolbar"));

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

    var _filterConstants = _interopRequireDefault(require("../../shared/components/filter/util/filterConstants.es"));

    var _ResultsBar = _interopRequireDefault(require("../../shared/components/results-bar/ResultsBar.es"));

    var _SearchField = _interopRequireDefault(require("../../shared/components/search-field/SearchField.es"));

    var _ProcessStepFilter = _interopRequireDefault(require("../filter/ProcessStepFilter.es"));

    var _RoleFilter = _interopRequireDefault(require("../filter/RoleFilter.es"));

    var _TimeRangeFilter = _interopRequireDefault(require("../filter/TimeRangeFilter.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 Header = function Header(_ref) {
      var filterKeys = _ref.filterKeys,
          routeParams = _ref.routeParams,
          selectedFilters = _ref.selectedFilters,
          totalCount = _ref.totalCount;
      var showFiltersResult = routeParams.search || selectedFilters.length > 0;
      return (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_managementToolbar.default, {
          className: "mb-0"
        }, /*#__PURE__*/_react.default.createElement(_managementToolbar.default.ItemList, null, /*#__PURE__*/_react.default.createElement(_managementToolbar.default.Item, null, /*#__PURE__*/_react.default.createElement("strong", {
          className: "ml-0 mr-0 navbar-text"
        }, Liferay.Language.get('filter-by'))), /*#__PURE__*/_react.default.createElement(_RoleFilter.default, {
          completed: true,
          filterKey: _filterConstants.default.roles.key,
          processId: routeParams.processId
        }), /*#__PURE__*/_react.default.createElement(_ProcessStepFilter.default, {
          filterKey: _filterConstants.default.processStep.key,
          processId: routeParams.processId
        })), /*#__PURE__*/_react.default.createElement(_SearchField.default, {
          disabled: false,
          placeholder: Liferay.Language.get('search-for-assignee-name')
        }), /*#__PURE__*/_react.default.createElement(_managementToolbar.default.ItemList, null, /*#__PURE__*/_react.default.createElement(_TimeRangeFilter.default, {
          buttonClassName: "btn-flat btn-sm",
          options: {
            position: 'right'
          }
        }))), showFiltersResult && /*#__PURE__*/_react.default.createElement(_ResultsBar.default, null, /*#__PURE__*/_react.default.createElement(_ResultsBar.default.TotalCount, {
          search: routeParams.search,
          totalCount: totalCount
        }), /*#__PURE__*/_react.default.createElement(_ResultsBar.default.FilterItems, _extends({
          filters: selectedFilters
        }, routeParams)), /*#__PURE__*/_react.default.createElement(_ResultsBar.default.Clear, _extends({
          filterKeys: filterKeys,
          filters: selectedFilters
        }, routeParams))))
      );
    };

    exports.Header = Header;
    //# sourceMappingURL=PerformanceByAssigneePageHeader.es.js.map
  }
});
//# sourceMappingURL=PerformanceByAssigneePageHeader.es.js.map