"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.synapse = void 0;
var _Core = require("../../../../Core.constants");
const synapse = function () {
  let {
    event,
    instances,
    origin: {
      commissionCode
    } = {},
    urlParams: {
      fingerprint
    } = {}
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  if (commissionCode !== _Core.SYNAPSE_COMMISSION_CODE || !fingerprint) return;
  window.gtag('event', event, {
    chat_source: fingerprint.includes('whatsapp') ? 'whatsapp' : 'sarai',
    send_to: instances.map(function () {
      let {
        idAnalytics
      } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      return idAnalytics;
    })
  });
};
exports.synapse = synapse;
//# sourceMappingURL=synapse.js.map