"use strict";

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