"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getUrlCriptan = void 0;
var _toUrlParams = require("./toUrlParams");
var _ButtonPayment = require("../ButtonPayment.constants");
const getUrlCriptan = _ref => {
  let {
    criptanNumOrder,
    environment,
    id,
    locale,
    tracking,
    urlParams: {
      hsri = _ButtonPayment.DEFAULT_HSRI,
      idchain,
      variant
    } = {}
  } = _ref;
  if (!criptanNumOrder || !id || !locale) return;
  return "".concat(process.env.SERVICE_BOOKING, "/").concat(_ButtonPayment.ENDPOINT.CRIPTAN).concat((0, _toUrlParams.toUrlParams)({
    idTokenProvider: id,
    env: environment,
    hsri,
    idchain,
    lang: locale.split('-')[0],
    numOrder: criptanNumOrder,
    variant,
    version: 2,
    tracking
  }));
};
exports.getUrlCriptan = getUrlCriptan;
//# sourceMappingURL=getUrlCriptan.js.map