import * as i0 from '@angular/core';
import { EventEmitter, Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import * as i1 from 'angular-google-tag-manager';

class Ga4EventsService {
    addPurchaseInfo(data) {
        this.purchaseData.next(data);
    }
    constructor(gtmService) {
        this.gtmService = gtmService;
        this.purchaseInfo = new EventEmitter();
        this.purchaseData = new BehaviorSubject({});
        this.purchaseDataVal = this.purchaseData.asObservable();
    }
    sendGA4Event(eventToSend, ecommerceObject) {
        this.dataLayer = { event: eventToSend, ecommerce: ecommerceObject };
        this.gtmService.pushTag({ ecommerce: null });
        this.gtmService.pushTag(this.dataLayer);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Ga4EventsService, deps: [{ token: i1.GoogleTagManagerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Ga4EventsService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Ga4EventsService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root'
                }]
        }], ctorParameters: function () { return [{ type: i1.GoogleTagManagerService }]; } });

/**
 * Generated bundle index. Do not edit.
 */

export { Ga4EventsService };
//# sourceMappingURL=testlocallibrary-shared-kernel-services-ga4-events.mjs.map
