2019-11-12 09:10:38 +00:00
|
|
|
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
2019-11-11 05:31:26 +00:00
|
|
|
import { RightDrawer } from '@app/types';
|
2019-11-12 09:10:38 +00:00
|
|
|
import { UserInfo } from '@ucap-webmessenger/protocol-room';
|
|
|
|
import {
|
|
|
|
UserInfoSS,
|
|
|
|
UserInfoF,
|
|
|
|
UserInfoDN,
|
|
|
|
} from '@ucap-webmessenger/protocol-query';
|
2019-11-11 05:31:26 +00:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-layout-messenger-right-drawer',
|
|
|
|
templateUrl: './right-drawer.component.html',
|
2019-11-12 09:10:38 +00:00
|
|
|
styleUrls: ['./right-drawer.component.scss'],
|
2019-11-11 05:31:26 +00:00
|
|
|
})
|
|
|
|
export class RightDrawerComponent implements OnInit {
|
|
|
|
@Input()
|
|
|
|
selectedRightDrawer: RightDrawer;
|
|
|
|
|
2019-11-12 09:10:38 +00:00
|
|
|
@Output()
|
|
|
|
openProfile = new EventEmitter<
|
|
|
|
UserInfo | UserInfoSS | UserInfoF | UserInfoDN
|
|
|
|
>();
|
2019-11-13 02:06:13 +00:00
|
|
|
@Output()
|
|
|
|
closeRightDrawer = new EventEmitter();
|
2019-11-12 09:10:38 +00:00
|
|
|
|
2019-11-11 05:31:26 +00:00
|
|
|
RightDrawer = RightDrawer;
|
|
|
|
|
|
|
|
constructor() {}
|
|
|
|
|
|
|
|
ngOnInit() {}
|
2019-11-12 09:10:38 +00:00
|
|
|
|
|
|
|
onClickOpenProfile(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
|
|
|
this.openProfile.emit(userInfo);
|
|
|
|
}
|
2019-11-13 02:06:13 +00:00
|
|
|
|
|
|
|
onClickClose() {
|
|
|
|
this.closeRightDrawer.emit();
|
|
|
|
}
|
2019-11-11 05:31:26 +00:00
|
|
|
}
|