"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.logged = void 0;
const logged = function () {
  let {
    instances = [],
    response: {
      country,
      email,
      firstName,
      lastName,
      level
    } = {}
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  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 {
        idAnalytics
      } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      return idAnalytics;
    }),
    step: 'LOGIN'
  };
  window.gtag('event', 'login', value);
  return value;
};
exports.logged = logged;
//# sourceMappingURL=logged.js.map