Liferay.Loader.define("portal-workflow-metrics-web@2.0.46/js/shared/components/filter/hooks/useFiltersConstants.es", ['module', 'exports', 'require', 'frontend-js-react-web$react', '../util/filterConstants.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.useFiltersConstants = void 0;

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

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

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

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * The contents of this file are subject to the terms of the Liferay Enterprise
     * Subscription License ("License"). You may not use this file except in
     * compliance with the License. You can obtain a copy of the License by
     * contacting Liferay, Inc. See the License for the specific language governing
     * permissions and limitations under the License, including but not limited to
     * distribution rights of the Software.
     */
    var useFiltersConstants = function useFiltersConstants(filterKeys) {
      return (0, _react.useMemo)(function () {
        var keys = [];
        var pinnedValues = [];
        var titles = [];
        filterKeys.forEach(function (filterKey) {
          if (_filterConstants.default[filterKey]) {
            keys.push(_filterConstants.default[filterKey].key);
            pinnedValues.push(_filterConstants.default[filterKey].pinned);
            titles.push(_filterConstants.default[filterKey].title);
          }
        });
        return {
          keys: keys,
          pinnedValues: pinnedValues,
          titles: titles
        }; // eslint-disable-next-line react-hooks/exhaustive-deps
      }, [filterKeys]);
    };

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