UNPKG

skip-event-bridge

Version:
26 lines (21 loc) 774 B
/* eslint-disable @typescript-eslint/no-explicit-any */ import MobileStrategy from './MobileStrategy'; import EventAction from '../EventAction'; import { Provider } from '../types'; export default class MobileUXCamStrategy extends MobileStrategy implements Provider { // eslint-disable-next-line no-useless-constructor constructor(uxcam: any, debug: boolean) { super(null, debug); this.action = new EventAction(); this.provider = uxcam; this.debug = debug; } addEvent(eventName: string): void { this.provider.logEvent(eventName); if (this.debug) console.log('Event send to UX_CAM: ', eventName); } addCharged(): void { this.provider.logEvent('Charged'); if (this.debug) console.log('Event send to UX_CAM: ', 'Charged'); } }