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,
|
2019-12-26 08:34:52 +00:00
|
|
|
UserInfoDN
|
2019-11-12 09:10:38 +00:00
|
|
|
} 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-12-26 08:34:52 +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()
|
2019-12-26 08:34:52 +00:00
|
|
|
openProfile = new EventEmitter<{
|
|
|
|
userInfo: 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) {
|
2019-12-26 08:34:52 +00:00
|
|
|
this.openProfile.emit({ userInfo });
|
2019-11-12 09:10:38 +00:00
|
|
|
}
|
2019-11-13 02:06:13 +00:00
|
|
|
|
|
|
|
onClickClose() {
|
|
|
|
this.closeRightDrawer.emit();
|
|
|
|
}
|
2019-11-11 05:31:26 +00:00
|
|
|
}
|