import { Component, OnInit } from '@angular/core'; import { ucapAnimations } from '@ucap-webmessenger/ui'; import { Store, select } from '@ngrx/store'; import { NGXLogger } from 'ngx-logger'; import { Observable } from 'rxjs'; import { Info } from '@ucap-webmessenger/protocol-event'; import * as AppStore from '@app/store'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { LoginInfo, KEY_LOGIN_INFO } from '@app/types'; @Component({ selector: 'app-layout-messenger-messages', templateUrl: './messages.component.html', styleUrls: ['./messages.component.scss'], animations: ucapAnimations }) export class MessagesComponent implements OnInit { loginRes$: Observable; eventList$: Observable; constructor( private store: Store, private sessionStorageService: SessionStorageService, private logger: NGXLogger ) {} ngOnInit() { const loginInfo = this.sessionStorageService.get(KEY_LOGIN_INFO); this.loginRes$ = this.store.pipe( select(AppStore.AccountSelector.AuthenticationSelector.loginRes) ); this.eventList$ = this.store.pipe( select(AppStore.MessengerSelector.EventSelector.infoList) ); } selectContact() {} }