"use strict";

exports.__esModule = true;
exports.transformCustomNumberRangeFilterToWQL = void 0;
const transformCustomNumberRangeFilterToWQL = (filterName, filterValue) => {
  const numberRangeWQLFilters = [];
  if (filterValue.from) {
    numberRangeWQLFilters.push({
      [filterName]: {
        $gte: filterValue.from
      }
    });
  }
  if (filterValue.to) {
    numberRangeWQLFilters.push({
      [filterName]: {
        $lte: filterValue.to
      }
    });
  }
  return numberRangeWQLFilters;
};
exports.transformCustomNumberRangeFilterToWQL = transformCustomNumberRangeFilterToWQL;
//# sourceMappingURL=transformCustomNumberRangeFilterToWQL.js.map