var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import { store } from 'src/app/redux/store';
export var track = function (event, params, hashed_email) {
    var _a, _b, _c;
    if (window.dataLayer == null)
        return;
    var removedDlEvents = (_c = (_b = (_a = store.getState()) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.config) === null || _c === void 0 ? void 0 : _c.removedDlEvents;
    if (removedDlEvents === null || removedDlEvents === void 0 ? void 0 : removedDlEvents.includes(event)) {
        return;
    }
    window.dataLayer.push(__assign({ event: event }, params));
};
export var trackOptimizely = function (props) {
    if (!window)
        return;
    window['optimizely'] = window['optimizely'] || [];
    window['optimizely'].push(__assign({ type: 'event' }, props));
};
