"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getProfileUrl = void 0;
var _Core = require("../../../Core.constants");
var _helpers = require("../../helpers");
var _Session = require("../Session.constants");
const getProfileUrl = function () {
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    authType = _ref.authType,
    id = _ref.id,
    _ref$forwarder = _ref.forwarder,
    _ref$forwarder2 = _ref$forwarder === void 0 ? {} : _ref$forwarder,
    url = _ref$forwarder2.profile,
    language = _ref.language,
    _ref$urlParams = _ref.urlParams,
    _ref$urlParams2 = _ref$urlParams === void 0 ? {} : _ref$urlParams,
    miraiId = _ref$urlParams2.miraiId,
    type = _ref$urlParams2.type,
    value = _ref.value;
  if (!id || !language || !url) return;
  return authType === _Core.AUTH_TYPE.SENATOR ? _Session.SENATOR_PROFILE_URL[language] || _Session.SENATOR_PROFILE_URL['en'] : "".concat(url).concat((0, _helpers.toUrlParams)({
    idtokenprovider: id,
    lang: language,
    miraiId,
    context: value,
    type
  }));
};
exports.getProfileUrl = getProfileUrl;
//# sourceMappingURL=getProfileUrl.js.map