"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.toUrlParams = void 0;
const DEFAULT_VALUE = '';
const toUrlParams = function () {
  let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  if (typeof values !== 'object') return DEFAULT_VALUE;
  const params = Object.fromEntries(Object.entries(values).filter(value => !!value[1]));
  if (process.env.NODE_ENV === 'development') params.env = 'dev';else if (process.env.NODE_ENV === 'preproduction') params.env = 'pre';else if (process.env.NODE_ENV !== 'production') params.env = process.env.NODE_ENV;
  let urlParams = DEFAULT_VALUE;
  if (Object.keys(params).length > 0) urlParams = "?".concat(new URLSearchParams(Object.entries(params)));
  return urlParams;
};
exports.toUrlParams = toUrlParams;
//# sourceMappingURL=toUrlParams.js.map