"use strict";

exports.__esModule = true;
exports.renderOperatorFilterToolbarTag = void 0;
var _bexCore = require("@wix/bex-core");
var _react = require("react");
var _FilterTagContent = require("../AppliedFiltersTagList/FilterTagContent");
const renderOperatorFilterToolbarTag = (container, params) => {
  return item => {
    const {
      filterProps
    } = params;
    const {
      translate: t
    } = container;
    const {
      operator,
      value
    } = item;
    const operatorLabel = t((0, _bexCore.getOperatorLabel)(operator));
    const displayValue = value != null && value !== '' ? `  ${value}` : '';
    return {
      children: /*#__PURE__*/(0, _react.createElement)(_FilterTagContent.FilterTagContent, {
        filterProps
      }, `${operatorLabel}${displayValue}`)
    };
  };
};
exports.renderOperatorFilterToolbarTag = renderOperatorFilterToolbarTag;
//# sourceMappingURL=renderOperatorFilterToolbarTag.js.map