"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.logged = void 0;
const logged = function () {
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    _ref$instances = _ref.instances,
    instances = _ref$instances === void 0 ? [] : _ref$instances,
    _ref$response = _ref.response,
    _ref$response2 = _ref$response === void 0 ? {} : _ref$response,
    country = _ref$response2.country,
    email = _ref$response2.email,
    firstName = _ref$response2.firstName,
    lastName = _ref$response2.lastName,
    level = _ref$response2.level;
  const value = {
    name: firstName === null || firstName === void 0 ? void 0 : firstName.split(' ').join('_'),
    lastName: lastName === null || lastName === void 0 ? void 0 : lastName.split(' ').join('_'),
    country,
    email,
    level: level === null || level === void 0 ? void 0 : level.split(' ').join('_'),
    send_to: instances.map(function () {
      let _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
        idAnalytics = _ref2.idAnalytics;
      return idAnalytics;
    }),
    step: 'LOGIN'
  };
  window.gtag('event', 'login', value);
  return value;
};
exports.logged = logged;
//# sourceMappingURL=logged.js.map