import { OnInit, OnChanges, SimpleChanges } from '@angular/core'; import { CoHostResponsibility, EventType, Message, Participant, ShowAlert } from '../../../@types/types'; import { SendMessage, SendMessageOptions } from '../../../methods/message-methods/send-message.service'; import { Socket } from 'socket.io-client'; import * as i0 from "@angular/core"; export interface MessagesModalOptions { isMessagesModalVisible: boolean; onMessagesClose: () => void; onSendMessagePress?: (options: SendMessageOptions) => Promise; messages: Message[]; position?: string; backgroundColor?: string; activeTabBackgroundColor?: string; eventType: EventType; member: string; islevel: string; coHostResponsibility: CoHostResponsibility[]; coHost: string; startDirectMessage: boolean; directMessageDetails: Participant | null; updateStartDirectMessage: (start: boolean) => void; updateDirectMessageDetails: (participant: Participant | null) => void; showAlert?: ShowAlert; roomName: string; socket: Socket; chatSetting: string; overlayStyle?: Partial; contentStyle?: Partial; customTemplate?: any; } export type MessagesModalType = (options: MessagesModalOptions) => void; /** * MessagesModal - Full-featured chat modal with group and direct messaging * * @component * @selector app-messages-modal * @templateUrl ./messages-modal.component.html * @styleUrls ./messages-modal.component.css * @standalone true * @imports [CommonModule, FontAwesomeModule, MessagePanel] * * @description * A comprehensive chat modal supporting group and direct messaging with full UI customization. * Supports three levels of customization: * 1. **Style Overrides**: Customize appearance with `overlayStyle` and `contentStyle` * 2. **Component Integration**: Integrates with MediaSFU messaging system * 3. **Complete Replacement**: Use `customTemplate` for full UI control * * Features: * - Group chat for all participants * - Direct messaging between participants * - Message history and real-time updates * - Read receipts and sender identification * - Host/co-host message controls * - Socket-based real-time messaging * * @example * **Basic Usage** * ```html * * * ``` * * @example * **With Style Customization** * ```html * * * ``` * * @example * **Custom Template Override** * ```html * * * * *
*

Chat ({{ context.messages.length }} messages)

*
* {{ message.sender }}: {{ message.message }} *
*
*
* ``` * * @input {boolean} isMessagesModalVisible - Controls modal visibility * @input {() => void} onMessagesClose - Callback when modal is closed * @input {Message[]} messages - Array of chat messages * @input {string} position - Modal position (default: 'bottomRight') * @input {string} backgroundColor - Modal background color (default: '#f5f5f5') * @input {EventType} eventType - Type of event (meeting, webinar, etc.) * @input {string} member - Current user's name/ID * @input {string} islevel - User's privilege level * @input {Socket} socket - Socket.io connection for real-time messaging * @input {string} roomName - Room identifier * @input {Partial} overlayStyle - Custom overlay styles * @input {Partial} contentStyle - Custom content styles * @input {TemplateRef} customTemplate - Complete template override */ export declare class MessagesModal implements OnInit, OnChanges { private SendMessageService; constructor(SendMessageService: SendMessage); isMessagesModalVisible: boolean; onMessagesClose: () => void; onSendMessagePress: (options: SendMessageOptions) => Promise; messages: Message[]; position: string; backgroundColor: string; activeTabBackgroundColor: string; eventType: EventType; member: string; islevel: string; coHostResponsibility: CoHostResponsibility[]; coHost: string; startDirectMessage: boolean; directMessageDetails: Participant | null; updateStartDirectMessage: (start: boolean) => void; updateDirectMessageDetails: (participant: Participant | null) => void; showAlert?: ShowAlert; roomName: string; socket: Socket; chatSetting: string; overlayStyle?: Partial; contentStyle?: Partial; customTemplate?: any; faTimes: import("@fortawesome/fontawesome-common-types").IconDefinition; directMessages: Array; groupMessages: Array; activeTab: string; focusedInput: boolean; reRender: boolean; modalContainerStyle: any; modalContentStyle: any; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; switchToDirectTab(): void; switchToGroupTab(): void; populateMessages(): void; closeMessagesModal(): void; updateModalStyles(): void; getTabStyle(tab: string): { backgroundColor?: string; color?: string; borderRadius?: string; paddingRight: string; paddingLeft: string; paddingTop: string; paddingBottom: string; fontWeight: string; marginRight: string; marginLeft: string; }; getButtonCloseStyle(): { marginLeft: string; padding: string; marginRight: string; paddingRight: string; }; get styles(): { modalContent: { borderRadius: string; padding: string; }; modalBody: { marginTop: string; }; tabText: { paddingRight: string; paddingLeft: string; paddingTop: string; paddingBottom: string; fontWeight: string; marginRight: string; marginLeft: string; }; activeTabText: { color: string; backgroundColor: string; borderRadius: string; }; separator: { height: string; backgroundColor: string; marginVertical: string; }; btnCloseMessages: { padding: string; marginRight: string; paddingRight: string; }; icon: { fontSize: string; color: string; }; }; getCombinedOverlayStyle(): any; getCombinedContentStyle(): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }