UNPKG

@hsaadawy/ngx-chat

Version:
29 lines (28 loc) 1.04 kB
import { BehaviorSubject } from 'rxjs'; import { Recipient } from '../core/recipient'; import { ChatService } from './chat-service'; export declare class ChatWindowState { readonly recipient: Recipient; isCollapsed: boolean; constructor(recipient: Recipient, isCollapsed: boolean); } export interface AttachableTrack { attach(elem: HTMLVideoElement): void; } /** * Used to open chat windows programmatically. */ export declare class ChatListStateService { private chatService; openChats$: BehaviorSubject<ChatWindowState[]>; openTracks$: BehaviorSubject<AttachableTrack[]>; constructor(chatService: ChatService); private openChatCollapsed; openChat(recipient: Recipient): void; closeChat(recipient: Recipient): void; openTrack(track: AttachableTrack): void; closeTrack(track: AttachableTrack): void; isChatWithRecipientOpen(recipient: Recipient): boolean; private findChatWindowStateIndexByRecipient; private findChatWindowStateByRecipient; }