"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getFeatures = void 0;
var _Rates = require("../Rates.constants");
const getFeatures = function () {
  let ratesFeatures = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  let urlParams = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  let {
    isDesktop
  } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  const urlFeatures = urlParams.features ? urlParams.features.split(',') : [];
  const features = {};
  Object.values(_Rates.FEATURES).forEach(feature => {
    features[feature] = urlFeatures.includes(feature) || ratesFeatures[feature] || false;
  });
  if (features.columnMode) features.columnMode = isDesktop && features.columnMode;
  return features;
};
exports.getFeatures = getFeatures;
//# sourceMappingURL=getFeatures.js.map