1import {Component, OnInit} from '@angular/core';
2import {CooeeService} from './services/cooee.service';
3
4@Component({
5 selector: 'app-root',
6 templateUrl: './app.component.html',
7 styleUrls: ['./app.component.scss'],
8})
9export class AppComponent implements OnInit {
10
11 constructor(private readonly cooeeService: CooeeService) {
12 this.cooeeService.init();
13 }
14
15 ngOnInit(): void {
16
17 this.cooeeService.onCTA()
18 .subscribe((payload: Record<string, any>) => {
19 if (!payload) return;
20
21 if (payload.actionType === 'VIEW_ITEM') {
22
23 } else if (payload.actionType == 'GO_TO_SCREEN') {
24
25 }
26 });
27 }
28
29}
30