import * as _angular_core from '@angular/core'; import { TemplateRef, OnInit, OnDestroy } from '@angular/core'; import { ChatRenderers, ChatAttachmentRenderContext, ChatMessageRenderContext, ChatInputRenderContext, ChatRenderContext, IgcChatMessageAttachment, IgcChatMessage, IgcChatComponent, IgcChatOptions, IgcChatMessageReaction } from 'igniteui-webcomponents'; type ChatContextUnion = ChatAttachmentRenderContext | ChatMessageRenderContext | ChatInputRenderContext | ChatRenderContext; type ChatContextType = T extends ChatAttachmentRenderContext ? IgcChatMessageAttachment : T extends ChatMessageRenderContext ? IgcChatMessage : T extends ChatInputRenderContext ? string : T extends ChatRenderContext ? { instance: IgcChatComponent; } : never; type ExtractChatContext = T extends (ctx: infer R) => any ? R : never; type ChatTemplatesContextMap = { [K in keyof ChatRenderers]: { $implicit: ChatContextType> & ChatContextUnion>; }; }; /** * Template references for customizing chat component rendering. * Each property corresponds to a specific part of the chat UI that can be customized. * * @example * ```typescript * templates = { * messageContent: this.customMessageTemplate, * attachment: this.customAttachmentTemplate * } * ``` */ type IgxChatTemplates = { [K in keyof Omit]?: TemplateRef; }; /** * Configuration options for the chat component. */ type IgxChatOptions = Omit; /** * Angular wrapper component for the Ignite UI Web Components Chat component. * * This component provides an Angular-friendly interface to the igc-chat web component, * including support for Angular templates, signals, and change detection. * * Uses OnPush change detection strategy for optimal performance. All inputs are signals, * so changes are automatically tracked and propagated to the underlying web component. * * @example * ```typescript * * ``` */ declare class IgxChatComponent implements OnInit, OnDestroy { private readonly _view; private readonly _templateViewRefs; private _oldTemplates; protected readonly _transformedTemplates: _angular_core.WritableSignal; protected readonly _mergedOptions: _angular_core.Signal; /** Array of chat messages to display */ readonly messages: _angular_core.InputSignal; /** Draft message with text and optional attachments */ readonly draftMessage: _angular_core.InputSignal<{ text: string; attachments?: IgcChatMessageAttachment[]; }>; /** Configuration options for the chat component */ readonly options: _angular_core.InputSignal; /** Custom templates for rendering chat elements */ readonly templates: _angular_core.InputSignal; /** Emitted when a new message is created */ readonly messageCreated: _angular_core.OutputEmitterRef; /** Emitted when a user reacts to a message */ readonly messageReact: _angular_core.OutputEmitterRef; /** Emitted when an attachment is clicked */ readonly attachmentClick: _angular_core.OutputEmitterRef; /** Emitted when attachment drag starts */ readonly attachmentDrag: _angular_core.OutputEmitterRef; /** Emitted when attachment is dropped */ readonly attachmentDrop: _angular_core.OutputEmitterRef; /** Emitted when typing indicator state changes */ readonly typingChange: _angular_core.OutputEmitterRef; /** Emitted when the input receives focus */ readonly inputFocus: _angular_core.OutputEmitterRef; /** Emitted when the input loses focus */ readonly inputBlur: _angular_core.OutputEmitterRef; /** Emitted when the input value changes */ readonly inputChange: _angular_core.OutputEmitterRef; /** @internal */ ngOnInit(): void; /** @internal */ ngOnDestroy(): void; constructor(); private _setTemplates; private _createTemplateRenderer; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Context provided to the chat input template. */ interface ChatInputContext { /** The current input value */ $implicit: string; /** Array of attachments associated with the input */ attachments: IgcChatMessageAttachment[]; } /** * Directive providing type information for chat message template contexts. * Use this directive on ng-template elements that render chat messages. * * @example * ```html * *
{{ message.text }}
*
* ``` */ declare class IgxChatMessageContextDirective { static ngTemplateContextGuard(_: IgxChatMessageContextDirective, ctx: unknown): ctx is { $implicit: IgcChatMessage; }; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Directive providing type information for chat attachment template contexts. * Use this directive on ng-template elements that render message attachments. * * @example * ```html * * * * ``` */ declare class IgxChatAttachmentContextDirective { static ngTemplateContextGuard(_: IgxChatAttachmentContextDirective, ctx: unknown): ctx is { $implicit: IgcChatMessageAttachment; }; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Directive providing type information for chat input template contexts. * Use this directive on ng-template elements that render the chat input. * * @example * ```html * * * * ``` */ declare class IgxChatInputContextDirective { static ngTemplateContextGuard(_: IgxChatInputContextDirective, ctx: unknown): ctx is ChatInputContext; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } export { IgxChatAttachmentContextDirective, IgxChatComponent, IgxChatInputContextDirective, IgxChatMessageContextDirective }; export type { ChatInputContext, IgxChatOptions, IgxChatTemplates };