import { Component, OnInit } from '@angular/core';
import { ItemService} from '@farmmaps/common';
import { Observable} from 'rxjs';
import { commonActions } from '@farmmaps/common';
import { Store } from '@ngrx/store';

@Component({
    selector: 'app-test',
    templateUrl: './test.component.html',
    styleUrls: ['./test.component.scss'],
    standalone: false
})
export class TestComponent implements OnInit {

   public gradientItems:Observable<any[]>

   constructor(private itemService$:ItemService,private store$:Store ) { 
     this.gradientItems =  this.itemService$.getItemList("vnd.farmmaps.itemtype.gradient");  
   }

   ngOnInit(): void {
   }

   onTest(Event) {
     const a = {"unread":"1"}
     this.store$.dispatch(new commonActions.NotificationEvent(a));
   }
}
