import * as _angular_core from '@angular/core';
import { Injector, OnInit, OnDestroy } from '@angular/core';
import * as i1 from '@acorex/platform/layout/widget-core';
import { AXPValueWidgetComponent, AXPWidgetConfig } from '@acorex/platform/layout/widget-core';
import * as i2 from '@acorex/platform/workflow';
import { AXPWorkflowAction, AXPWorkflowContext, AXPWorkflow } from '@acorex/platform/workflow';
import * as i6 from '@angular/router';
import { AXPEntity } from '@acorex/platform/common';
import { AXPEntityModel, AXMEntityCrudServiceImpl } from '@acorex/platform/layout/entity';
import * as _acorex_platform_core from '@acorex/platform/core';
import { AXPContent, AXPUserReference, AXPFileListItem, AXPContentType, AXPBackButton, AXPActionMenuItem, AXPExecuteCommand, AXPEntityReference } from '@acorex/platform/core';
import { Observable } from 'rxjs';
import { AXContextMenuComponent, AXContextMenuOpeningEvent, AXContextMenuItemsClickEvent } from '@acorex/components/menu';
import { AXTabsComponent } from '@acorex/components/tabs';
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent } from '@acorex/platform/layout/views';
import * as _acorex_modules_conversation from '@acorex/modules/conversation';
import { AXConversationMessage, AXConversationActionEvent, AXConversationMenuOpeningEvent } from '@acorex/components/conversation';
import * as _angular_platform_browser from '@angular/platform-browser';
import { DomSanitizer } from '@angular/platform-browser';
import { AXWysiwygContainerComponent } from '@acorex/components/wysiwyg';
import { AXStyleLookType } from '@acorex/cdk/common';
import { AXBasePageComponent } from '@acorex/components/page';

declare const RootConfig: {
    config: {
        i18n: string;
        module: string;
        route: string;
    };
    module: {
        route: string;
        name: string;
        title: string;
        icon: string;
    };
    entities: {
        room: {
            name: string;
            title: string;
            source: string;
            icon: string;
        };
        message: {
            name: string;
            title: string;
            source: string;
            icon: string;
        };
        tab: {
            name: string;
            title: string;
            source: string;
            icon: string;
        };
    };
};

declare class AXMConversationTabEntityModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMConversationTabEntityModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMConversationTabEntityModule, never, never, never>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMConversationTabEntityModule>;
}

declare class AXMRoomEntityModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMRoomEntityModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMRoomEntityModule, never, never, never>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMRoomEntityModule>;
}

declare class AXMMessageEntityModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMessageEntityModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMMessageEntityModule, never, never, never>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMMessageEntityModule>;
}

declare class AXMConversationModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMConversationModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMConversationModule, never, [typeof i1.AXPWidgetCoreModule, typeof i2.AXPWorkflowModule, typeof AXMConversationTabEntityModule, typeof AXMRoomEntityModule, typeof AXMMessageEntityModule], [typeof i6.RouterModule]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMConversationModule>;
}

declare function tabFactory(injector: Injector): Promise<AXPEntity | null>;

declare function roomFactory(injector: Injector): Promise<AXPEntity | null>;

type AXMSeenType = 'delivered' | 'read';
type AXMReactionType = 'like' | 'love' | 'laugh' | 'angry' | 'sad' | string;
interface AXMConversationReaction {
    author: AXPUserReference;
    type: AXMReactionType;
}
interface AXMConversationSeen {
    author: AXPUserReference;
    type: AXMSeenType;
}
interface AXMConversationMessage extends AXPEntityModel<string> {
    roomId: string;
    message: AXPContent;
    author: AXPUserReference;
    replyId?: string | null;
    reactions: AXMConversationReaction[];
    seen: AXMConversationSeen[];
    isPinned?: boolean;
}

/**
 * Represents a single comment in a thread.
 * It can have nested replies (children).
 */
interface AXMComment extends AXMConversationMessage {
    /**
     * Nested replies to this comment.
     */
    replies: AXMComment[];
    /**
     * The number of direct replies to this comment.
     */
    replyCount: number;
    /**
     * The depth of the comment in the thread hierarchy.
     * Root comments have a depth of 0.
     */
    depth: number;
}
/**
 * Represents a comment thread, which is essentially a room for comments.
 * It contains the total number of comments and the top-level comments.
 */
interface AXMCommentThread extends AXMConversationRoom {
    /**
     * The total number of comments in the thread.
     */
    commentCount: number;
    /**
     * An array of root-level comments.
     */
    comments: AXMComment[];
}
type AXMCommentEventType = 'add' | 'remove' | 'update';
type AXMThreadEventType = 'add' | 'remove' | 'update';
interface AXMCommentEvent {
    type: AXMCommentEventType;
    /**
     * - For 'add' and 'update', payload is AXMComment.
     * - For 'remove', payload is the comment ID (string).
     */
    payload: AXMComment | string;
}
interface AXMThreadEvent {
    type: AXMThreadEventType;
    /**
     * - For 'add' and 'update', payload is AXMCommentThread.
     * - For 'remove', payload is the thread ID (string).
     */
    payload: AXMCommentThread | string;
}
interface AXMCommentEntityData {
    entityId: string;
    entityTypeId: string;
    moduleName?: string;
    entityName?: string;
}

interface AXMConversationRoom extends AXPEntityModel<string> {
    title?: string;
    members: AXPUserReference[];
    entityRef?: AXMCommentEntityData;
    topic?: 'support' | 'group' | 'channel' | 'personal' | string;
    type?: 'chat' | 'comment';
    avatar?: AXPFileListItem | string | null;
}

declare abstract class AXMRoomService extends AXMEntityCrudServiceImpl<string, AXMConversationRoom> {
}
declare class AXMRoomServiceImpl extends AXMRoomService {
    constructor();
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMRoomServiceImpl, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMRoomServiceImpl>;
}

interface AXMConversationTab {
    id: string;
    name: string;
    title: string;
    color?: string;
    excludeRooms: AXMConversationRoom[];
    includeRooms: AXMConversationRoom[];
}

declare abstract class AXMConversationTabService extends AXMEntityCrudServiceImpl<string, AXMConversationTab> {
}
declare class AXMConversationTabServiceImpl extends AXMConversationTabService {
    constructor();
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMConversationTabServiceImpl, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMConversationTabServiceImpl>;
}

declare function messageFactory(injector: Injector): Promise<AXPEntity | null>;

declare abstract class AXMMessageService extends AXMEntityCrudServiceImpl<string, AXMConversationMessage> {
}
declare class AXMMessageServiceImpl extends AXMMessageService {
    constructor();
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMessageServiceImpl, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMMessageServiceImpl>;
}

/**
 * Extended message interface for chat messages with UI-specific properties
 */
interface AXMChatMessage extends AXMConversationMessage {
}
/**
 * Extended room interface for chat rooms with UI-specific properties
 */
interface AXMChatRoom extends AXMConversationRoom {
    lastMessage?: AXMChatMessage;
    unreadCount: number;
}
type AXMChatRoomEvent = {
    type: 'add' | 'update';
    payload: AXMChatRoom;
} | {
    type: 'remove' | 'seen';
    payload: string;
};
type AXMChatMessageEvent = {
    type: 'add' | 'update';
    payload: AXMChatMessage;
} | {
    type: 'remove';
    payload: string;
};
type AXMChatTabEvent = {
    type: 'add' | 'update';
    payload: AXMConversationTab;
} | {
    type: 'remove';
    payload: string;
};

declare class AXMChatManagementService {
    private readonly chatService;
    private readonly sessionService;
    private readonly usersService;
    private readonly realtimeService;
    private readonly notificationConnectorService;
    private getCurrentUser;
    private getUserInfo;
    private formatMessage;
    private getUnreadCount;
    private formatRoom;
    createRoom(memberIds: string[], title?: string, avatar?: string | null): Promise<AXMChatRoom>;
    getRoom(roomId: string): Promise<AXMChatRoom>;
    listRooms(skip?: number, take?: number): Promise<{
        items: AXMChatRoom[];
        total: number;
    }>;
    updateRoom(roomId: string, data: Partial<AXMConversationRoom>): Promise<AXMConversationRoom>;
    deleteRoom(roomId: string): Promise<boolean>;
    addParticipant(roomId: string, userId: string): Promise<AXMConversationRoom>;
    removeParticipant(roomId: string, userId: string): Promise<AXMConversationRoom>;
    createTab(data: Omit<AXMConversationTab, 'id'>): Promise<AXMConversationTab>;
    getTab(tabId: string): Promise<AXMConversationTab>;
    listTabs(skip?: number, take?: number): Promise<{
        items: AXMConversationTab[];
        total: number;
    }>;
    updateTab(tabId: string, data: Partial<AXMConversationTab>): Promise<AXMConversationTab>;
    deleteTab(tabId: string): Promise<boolean>;
    addIncludeRoomToTab(tabId: string, roomId: string): Promise<AXMConversationTab>;
    removeIncludeRoomFromTab(tabId: string, roomId: string): Promise<AXMConversationTab>;
    addExcludeRoomToTab(tabId: string, roomId: string): Promise<AXMConversationTab>;
    removeExcludeRoomFromTab(tabId: string, roomId: string): Promise<AXMConversationTab>;
    sendMessage(roomId: string, content: string, contentType?: AXPContentType, replyId?: string, userId?: string): Promise<AXMChatMessage>;
    getMessages(roomId: string, skip?: number, take?: number): Promise<{
        items: AXMChatMessage[];
        total: number;
    }>;
    getMessage(messageId: string): Promise<AXMChatMessage>;
    editMessage(messageId: string, content: string, contentType?: AXPContentType): Promise<AXMConversationMessage>;
    deleteMessage(messageId: string): Promise<boolean>;
    replyMessage(replyToMessageId: string, content: string, contentType?: AXPContentType): Promise<AXMConversationMessage>;
    pinMessage(messageId: string): Promise<AXMConversationMessage>;
    unpinMessage(messageId: string): Promise<AXMConversationMessage>;
    addReaction(messageId: string, type: AXMReactionType): Promise<AXMConversationMessage>;
    removeReaction(messageId: string, type: AXMReactionType): Promise<AXMConversationMessage>;
    getReactions(messageId: string): Promise<AXMConversationReaction[]>;
    markSeen(messageId: string): Promise<AXMConversationMessage>;
    getSeenBy(messageId: string): Promise<AXMConversationSeen[]>;
    markRoomSeen(roomId: string): Promise<boolean>;
    startTyping(roomId: string, userId?: string): Promise<void>;
    stopTyping(roomId: string, userId?: string): Promise<void>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatManagementService, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatManagementService>;
}

declare abstract class AXMChatRealtimeService {
    abstract readonly room$: Observable<AXMChatRoomEvent>;
    abstract readonly message$: Observable<AXMChatMessageEvent>;
    abstract readonly tab$: Observable<AXMChatTabEvent>;
    abstract readonly typingStatus$: Observable<{
        roomId: string;
        user: AXPUserReference;
        isTyping: boolean;
    }>;
    abstract notifyRoom(event: AXMChatRoomEvent): void;
    abstract notifyMessage(event: AXMChatMessageEvent): void;
    abstract notifyTab(event: AXMChatTabEvent): void;
    abstract startTyping(user: AXPUserReference, roomId: string): void;
    abstract stopTyping(user: AXPUserReference, roomId: string): void;
}
declare class AXMChatRealtimeServiceImpl extends AXMChatRealtimeService {
    private readonly _room$;
    readonly room$: Observable<AXMChatRoomEvent>;
    private readonly _message$;
    readonly message$: Observable<AXMChatMessageEvent>;
    private readonly _tab$;
    readonly tab$: Observable<AXMChatTabEvent>;
    private readonly _typingStatus$;
    readonly typingStatus$: Observable<{
        roomId: string;
        user: AXPUserReference;
        isTyping: boolean;
    }>;
    notifyRoom(event: AXMChatRoomEvent): void;
    notifyMessage(event: AXMChatMessageEvent): void;
    notifyTab(event: AXMChatTabEvent): void;
    startTyping(user: AXPUserReference, roomId: string): void;
    stopTyping(user: AXPUserReference, roomId: string): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatRealtimeServiceImpl, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatRealtimeServiceImpl>;
}

declare class AXMChatComponent extends AXPPageLayoutBaseComponent implements OnInit {
    private activatedRoute;
    private chatService;
    private realtimeService;
    private dialogService;
    private layoutBuilder;
    private router;
    private unsubscribe;
    private notificationConnectorService;
    private dataSelectorService;
    private entityRegistry;
    tab: _angular_core.Signal<AXTabsComponent | undefined>;
    container: _angular_core.Signal<AXPPageLayoutComponent | undefined>;
    chatContext: _angular_core.Signal<AXContextMenuComponent | undefined>;
    tabContext: _angular_core.Signal<AXContextMenuComponent | undefined>;
    rooms: _angular_core.WritableSignal<AXMChatRoom[]>;
    allRooms: _angular_core.WritableSignal<AXMChatRoom[]>;
    tabs: _angular_core.WritableSignal<AXMConversationTab[]>;
    selectedRoom: _angular_core.WritableSignal<AXMChatRoom | null>;
    isLoading: _angular_core.WritableSignal<boolean>;
    typingStatus: _angular_core.WritableSignal<{
        [key: string]: {
            user: string;
            isTyping?: boolean;
        };
    }>;
    error: _angular_core.WritableSignal<string | null>;
    activeTabIndex: _angular_core.WritableSignal<number>;
    isSearching: _angular_core.WritableSignal<boolean>;
    searchQuery: _angular_core.WritableSignal<string>;
    showSearch: _angular_core.WritableSignal<boolean>;
    placeholder: _angular_core.WritableSignal<string>;
    tOpen: _angular_core.WritableSignal<string>;
    tMarkSeen: _angular_core.WritableSignal<string>;
    tTab: _angular_core.WritableSignal<string>;
    tRemoveFromTab: _angular_core.WritableSignal<string>;
    tDelete: _angular_core.WritableSignal<string>;
    tRemoveChat: _angular_core.WritableSignal<string>;
    activeTab: _angular_core.Signal<AXMConversationTab | undefined>;
    filteredRooms: _angular_core.WritableSignal<AXMChatRoom[]>;
    searchEffect: _angular_core.EffectRef;
    deleteTab(tab: AXMConversationTab): Promise<void>;
    unreadCount: _angular_core.Signal<number>;
    allCount: _angular_core.Signal<number>;
    hasUnread: _angular_core.Signal<boolean>;
    totalCount: _angular_core.Signal<number>;
    ngOnInit(): Promise<void>;
    private loadFromRoute;
    getPageTitle(): Promise<string>;
    getPageDescription(): string;
    getBackButton(): Promise<AXPBackButton | null>;
    getSecondaryMenuItems(): Promise<AXPActionMenuItem[]>;
    execute(command: AXPExecuteCommand): Promise<void>;
    onBackButtonClick(): void | Promise<void>;
    getRoomCountForTab(tab: AXMConversationTab): number;
    loadTabs(): Promise<void>;
    loadChats(): Promise<void>;
    refreshChat(): Promise<void>;
    openChat(chatId: string): Promise<void>;
    searchChat(query: string): void;
    onSearch(query: string): void;
    clearSearch(): void;
    openSelector(): Promise<string[]>;
    onNewConversation(): Promise<void>;
    onSlideAction(room: AXMChatRoom, action: 'delete'): void;
    deleteRoom(roomId: string): Promise<void>;
    private contextRoom;
    private contextTab;
    private contextTabIndex;
    openContextMenu(ev: MouseEvent, room: AXMChatRoom): void;
    openTabContextMenu(ev: MouseEvent, tab: AXMConversationTab, index: number): void;
    onContextOpening(e: AXContextMenuOpeningEvent): void;
    onTabContextOpening(e: AXContextMenuOpeningEvent): void;
    onTabContextItemClick(e: AXContextMenuItemsClickEvent): Promise<void>;
    onContextItemClick(e: AXContextMenuItemsClickEvent): void;
    onKeydownHandler(event: Event): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMChatComponent, "axm-chat", never, {}, {}, never, never, true, never>;
}

declare abstract class AXMChatService {
    abstract createRoom(members: AXPUserReference[], title: string | undefined, currentUser: AXPUserReference, avatar?: string): Promise<AXMConversationRoom>;
    abstract getRoom(roomId: string): Promise<AXMConversationRoom>;
    abstract listRooms(skip?: number, take?: number): Promise<{
        items: AXMConversationRoom[];
        total: number;
    }>;
    abstract updateRoom(roomId: string, data: Partial<AXMConversationRoom>, currentUser: AXPUserReference): Promise<AXMConversationRoom>;
    abstract deleteRoom(roomId: string): Promise<boolean>;
    abstract createTab(data: Omit<AXMConversationTab, 'id'>): Promise<AXMConversationTab>;
    abstract getTab(tabId: string): Promise<AXMConversationTab>;
    abstract listTabs(skip?: number, take?: number): Promise<{
        items: AXMConversationTab[];
        total: number;
    }>;
    abstract updateTab(tabId: string, data: Partial<AXMConversationTab>): Promise<AXMConversationTab>;
    abstract deleteTab(tabId: string): Promise<boolean>;
    abstract sendMessage(roomId: string, content: string, author: AXPUserReference, contentType?: AXPContentType, replyId?: string): Promise<AXMConversationMessage>;
    abstract getMessages(roomId: string, skip?: number, take?: number): Promise<{
        items: AXMConversationMessage[];
        total: number;
    }>;
    abstract getMessage(messageId: string): Promise<AXMConversationMessage>;
    abstract editMessage(messageId: string, content: string, currentUser: AXPUserReference, contentType?: AXPContentType): Promise<AXMConversationMessage>;
    abstract deleteMessage(messageId: string): Promise<boolean>;
    abstract pinMessage(messageId: string, isPinned: boolean, currentUser: AXPUserReference): Promise<AXMConversationMessage>;
    abstract updateReactions(messageId: string, reactions: AXMConversationReaction[], currentUser: AXPUserReference): Promise<AXMConversationMessage>;
    abstract getReactions(messageId: string): Promise<AXMConversationReaction[]>;
    abstract updateSeen(messageId: string, seen: AXMConversationSeen[], currentUser: AXPUserReference): Promise<AXMConversationMessage>;
    abstract getSeenBy(messageId: string): Promise<AXMConversationSeen[]>;
}
declare class AXMChatServiceImpl extends AXMChatService {
    private readonly roomService;
    private readonly messageService;
    private readonly tabService;
    createRoom(members: AXPUserReference[], title: string | undefined, currentUser: AXPUserReference, avatar?: string): Promise<AXMConversationRoom>;
    getRoom(roomId: string): Promise<AXMConversationRoom>;
    listRooms(skip?: number, take?: number): Promise<{
        items: AXMConversationRoom[];
        total: number;
    }>;
    updateRoom(roomId: string, data: Partial<AXMConversationRoom>, currentUser: AXPUserReference): Promise<AXMConversationRoom>;
    deleteRoom(roomId: string): Promise<boolean>;
    createTab(data: Omit<AXMConversationTab, 'id'>): Promise<AXMConversationTab>;
    getTab(tabId: string): Promise<AXMConversationTab>;
    listTabs(skip?: number, take?: number): Promise<{
        items: AXMConversationTab[];
        total: number;
    }>;
    updateTab(tabId: string, data: Partial<AXMConversationTab>): Promise<AXMConversationTab>;
    deleteTab(tabId: string): Promise<boolean>;
    sendMessage(roomId: string, content: string, author: AXPUserReference, contentType?: AXPContentType, replyId?: string): Promise<AXMConversationMessage>;
    getMessages(roomId: string, skip?: number, take?: number): Promise<{
        items: AXMConversationMessage[];
        total: number;
    }>;
    getMessage(messageId: string): Promise<AXMConversationMessage>;
    editMessage(messageId: string, content: string, currentUser: AXPUserReference, contentType?: AXPContentType): Promise<AXMConversationMessage>;
    deleteMessage(messageId: string): Promise<boolean>;
    pinMessage(messageId: string, isPinned: boolean, currentUser: AXPUserReference): Promise<AXMConversationMessage>;
    updateReactions(messageId: string, reactions: AXMConversationReaction[], currentUser: AXPUserReference): Promise<AXMConversationMessage>;
    getReactions(messageId: string): Promise<AXMConversationReaction[]>;
    updateSeen(messageId: string, seen: AXMConversationSeen[], currentUser: AXPUserReference): Promise<AXMConversationMessage>;
    getSeenBy(messageId: string): Promise<AXMConversationSeen[]>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatServiceImpl, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMChatServiceImpl>;
}

declare class AXMChatItemComponent {
    #private;
    data: _angular_core.InputSignal<AXMChatRoom>;
    typing: _angular_core.InputSignal<{
        user: string;
        isTyping: boolean;
    } | null>;
    lastMessageReaction: _angular_core.InputSignal<string | null>;
    pressChatItem: _angular_core.OutputEmitterRef<string>;
    private sessionService;
    private datePipe;
    private fileStorage;
    protected chatName: _angular_core.WritableSignal<{
        fullName: string;
        id: string;
        isPrivate: boolean;
    }>;
    protected groupAvatarUrl: _angular_core.WritableSignal<string | null>;
    private groupBlobUrl;
    protected isGroupAvatarLoading: _angular_core.WritableSignal<boolean>;
    private preloadAndSetGroupAvatar;
    ngOnDestroy(): void;
    protected formattedLastMessageDate: _angular_core.Signal<string | null>;
    protected lastMessage: _angular_core.Signal<{
        content: string;
        contentType: string;
        reactions: never[];
        author?: undefined;
    } | {
        content: string;
        contentType: _acorex_platform_core.AXPContentType;
        reactions: _acorex_modules_conversation.AXMConversationReaction[];
        author: _acorex_platform_core.AXPUserReference;
    }>;
    protected hasUnread: _angular_core.Signal<boolean>;
    protected unreadCount: _angular_core.Signal<string>;
    protected onPressChatItem(id: string): void;
    protected messageSeenStatus(): string;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatItemComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMChatItemComponent, "axm-chat-item", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "typing": { "alias": "typing"; "required": false; "isSignal": true; }; "lastMessageReaction": { "alias": "lastMessageReaction"; "required": false; "isSignal": true; }; }, { "pressChatItem": "pressChatItem"; }, never, never, true, never>;
}

declare class AXMChatPreviewComponent implements OnInit, OnDestroy {
    #private;
    private activatedRoute;
    private fileService;
    private chatService;
    private realtimeService;
    private sessionService;
    private toastService;
    private unsubscribe;
    private inputRef;
    private activeMessage;
    private typing$;
    private typingSubscription?;
    protected chatData: _angular_core.WritableSignal<AXConversationMessage[]>;
    protected room: _angular_core.WritableSignal<AXMChatRoom | null>;
    protected isEditing: _angular_core.WritableSignal<boolean>;
    protected editId: _angular_core.WritableSignal<string | null>;
    protected height: _angular_core.WritableSignal<number>;
    protected isLoading: _angular_core.WritableSignal<boolean>;
    protected error: _angular_core.WritableSignal<string | null>;
    protected isChannel: _angular_core.Signal<boolean>;
    protected setHeight(height: number): void;
    protected options: _angular_core.WritableSignal<{
        disabled: boolean;
        readonly: boolean;
        value: string;
    }>;
    protected roomId: string;
    ngOnInit(): void;
    ngOnDestroy(): void;
    handleTyping(event: any): void;
    handleFileChange(event: any): void;
    handleCancelRecord(event: any): void;
    handleEndRecord(event: any): void;
    handleOnSend(e: any): void;
    handleEnter(): void;
    handleOnAction(e: AXConversationActionEvent): void;
    scrollToEnd(): void;
    loadMessages(roomId: string): Promise<void>;
    loadRoomInfo(roomId: string): Promise<void>;
    protected addItemHandler(e: AXConversationMenuOpeningEvent): void;
    addInputOverlay(type: 'reply' | 'edit', message?: AXConversationMessage): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMChatPreviewComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMChatPreviewComponent, "axm-chat-preview", never, {}, {}, never, never, true, never>;
}

declare class AXMCommentManagementService {
    private readonly commentImplService;
    private readonly sessionService;
    private readonly usersService;
    private readonly realtimeService;
    private getCurrentUser;
    private getUserInfo;
    private formatComment;
    private buildCommentTree;
    private formatThread;
    createThread(entityRef: AXMCommentEntityData, topic: string, title?: string): Promise<AXMCommentThread>;
    getThread(entityRef: AXMCommentEntityData, topic: string): Promise<AXMCommentThread | null>;
    listThreads(entityRef: AXMCommentEntityData, topic: string): Promise<AXMCommentThread[]>;
    updateThread(entityRef: AXMCommentEntityData, topic: string, data: Partial<{
        title: string;
    }>): Promise<AXMCommentThread>;
    deleteThread(entityRef: AXMCommentEntityData, topic: string): Promise<boolean>;
    addComment(threadId: string, content: string, parentCommentId?: string, contentType?: AXPContentType, userId?: string): Promise<AXMComment>;
    getComments(threadId: string, nested: boolean): Promise<AXMComment[]>;
    getComment(commentId: string): Promise<AXMComment>;
    editComment(commentId: string, content: string, contentType?: AXPContentType): Promise<AXMComment>;
    deleteComment(commentId: string): Promise<boolean>;
    addReaction(commentId: string, type: AXMReactionType): Promise<AXMComment>;
    removeReaction(commentId: string, type: AXMReactionType): Promise<AXMComment>;
    getReactions(commentId: string): Promise<AXMConversationReaction[]>;
    likeComment(commentId: string): Promise<AXMComment>;
    unlikeComment(commentId: string): Promise<AXMComment>;
    pinComment(commentId: string): Promise<AXMComment>;
    unpinComment(commentId: string): Promise<AXMComment>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentManagementService, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMCommentManagementService>;
}

declare abstract class AXMCommentRealtimeService {
    abstract readonly comment$: Observable<AXMCommentEvent>;
    abstract readonly thread$: Observable<AXMThreadEvent>;
    abstract notifyComment(event: AXMCommentEvent): void;
    abstract notifyThread(event: AXMThreadEvent): void;
}
declare class AXMCommentRealtimeServiceImpl extends AXMCommentRealtimeService {
    private readonly _comment$;
    readonly comment$: Observable<AXMCommentEvent>;
    private readonly _thread$;
    readonly thread$: Observable<AXMThreadEvent>;
    notifyComment(event: AXMCommentEvent): void;
    notifyThread(event: AXMThreadEvent): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentRealtimeServiceImpl, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMCommentRealtimeServiceImpl>;
}

declare class AXMCommentComponent implements OnInit {
    refrenceType: _angular_core.InputSignal<string>;
    refrenceId: _angular_core.InputSignal<string>;
    subject: _angular_core.InputSignal<string>;
    moduleName: _angular_core.WritableSignal<string | undefined>;
    entityName: _angular_core.WritableSignal<string | undefined>;
    protected hasCooldown: _angular_core.WritableSignal<boolean>;
    protected commentContent: _angular_core.WritableSignal<string>;
    protected isSubmitting: _angular_core.WritableSignal<boolean>;
    protected isReplyingMode: _angular_core.WritableSignal<boolean>;
    protected isEditingMode: _angular_core.WritableSignal<boolean>;
    protected isLoading: _angular_core.WritableSignal<boolean>;
    protected failedImageIds: _angular_core.WritableSignal<string[]>;
    protected activeReplyComment: _angular_core.WritableSignal<(AXMComment & {
        userName: string;
    }) | undefined>;
    protected activeEditComment: _angular_core.WritableSignal<(AXMComment & {
        userName: string;
    }) | undefined>;
    protected highlightedCommentId: _angular_core.WritableSignal<string | null>;
    protected wysiwygEditor: _angular_core.Signal<AXWysiwygContainerComponent>;
    private commentService;
    private realtimeService;
    private sessionService;
    private toastService;
    private dialogService;
    private notificationConnectorService;
    private router;
    private activatedRoute;
    sanitize: DomSanitizer;
    private destroyRef;
    protected comments: _angular_core.WritableSignal<AXMComment[]>;
    protected thread: _angular_core.WritableSignal<AXMCommentThread | undefined>;
    ngOnInit(): void;
    private handleAddComment;
    private handleUpdateComment;
    protected wysiwygOptions: _angular_core.WritableSignal<{
        look: AXStyleLookType;
    }>;
    protected avatarConfig: _angular_core.WritableSignal<{
        color: string;
        look: "sharp" | "soft" | "rounded";
        type: string;
    }>;
    private getCurrentUser;
    protected isLikedByUser(comment: AXMComment): boolean;
    protected getReactionsCount(comment: AXMComment): number;
    sanitizeHtml(htmlContent: string | undefined): _angular_platform_browser.SafeHtml;
    handleImageError(imageId: string): void;
    checkImageExists(imageId: string): boolean;
    loadComments(): Promise<void>;
    editMessage(comment: AXMComment, reply?: AXMComment, userName?: string): void;
    replyMessage(comment: AXMComment, reply?: AXMComment, userName?: string): void;
    deleteComment(commentId: string): Promise<void>;
    resetReplyEditState(): void;
    toggleLike(comment: AXMComment): Promise<void>;
    private updateLikeStatus;
    private removeMessageById;
    protected submitComment(): Promise<void>;
    scrollMain(): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMCommentComponent, "axm-comment", never, { "refrenceType": { "alias": "refrenceType"; "required": true; "isSignal": true; }; "refrenceId": { "alias": "refrenceId"; "required": true; "isSignal": true; }; "subject": { "alias": "subject"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare abstract class AXMCommentService {
    abstract createThread(entityRef: AXMCommentEntityData, topic: string, title?: string): Promise<AXMCommentThread>;
    abstract getThread(entityRef: AXMCommentEntityData, topic: string): Promise<AXMCommentThread | null>;
    abstract listThreads(entityRef: AXMCommentEntityData, topic: string): Promise<AXMCommentThread[]>;
    abstract updateThread(entityRef: AXMCommentEntityData, topic: string, data: Partial<{
        title: string;
    }>): Promise<AXMCommentThread>;
    abstract deleteThread(entityRef: AXMCommentEntityData, topic: string): Promise<boolean>;
    abstract addComment(threadId: string, content: string, parentCommentId?: string, contentType?: AXPContentType, userId?: string): Promise<AXMComment>;
    abstract getComments(threadId: string, nested: boolean): Promise<AXMComment[]>;
    abstract getComment(commentId: string): Promise<AXMComment>;
    abstract editComment(commentId: string, content: string, contentType?: AXPContentType): Promise<AXMComment>;
    abstract deleteComment(commentId: string): Promise<boolean>;
    abstract addReaction(commentId: string, type: AXMReactionType): Promise<AXMComment>;
    abstract removeReaction(commentId: string, type: AXMReactionType): Promise<AXMComment>;
    abstract getReactions(commentId: string): Promise<AXMConversationReaction[]>;
    abstract likeComment(commentId: string): Promise<AXMComment>;
    abstract unlikeComment(commentId: string): Promise<AXMComment>;
    abstract pinComment(commentId: string): Promise<AXMComment>;
    abstract unpinComment(commentId: string): Promise<AXMComment>;
}
declare class AXMCommentServiceImpl {
    private readonly roomService;
    private readonly messageService;
    private readonly filterService;
    createThread(creatorUser: AXPUserReference, entityRef: AXMCommentEntityData, topic: string, title?: string): Promise<AXMConversationRoom>;
    getThread(entityRef: AXMCommentEntityData, topic: string): Promise<AXMConversationRoom | null>;
    listThreads(entityRef: AXMCommentEntityData, topic: string): Promise<AXMConversationRoom[]>;
    updateThread(threadId: string, data: Partial<{
        title: string;
    }>): Promise<AXMConversationRoom>;
    deleteThread(threadId: string): Promise<boolean>;
    addComment(threadId: string, content: string, author: AXPUserReference, parentCommentId?: string, contentType?: AXPContentType): Promise<AXMConversationMessage>;
    getComments(threadId: string): Promise<AXMConversationMessage[]>;
    getComment(commentId: string): Promise<AXMConversationMessage>;
    editComment(commentId: string, content: string, editor: AXPUserReference, contentType?: AXPContentType): Promise<AXMConversationMessage>;
    deleteComment(commentId: string): Promise<boolean>;
    updateReactions(commentId: string, reactions: AXMConversationReaction[]): Promise<AXMConversationMessage>;
    getReactions(commentId: string): Promise<AXMConversationReaction[]>;
    pinComment(commentId: string, isPinned: boolean): Promise<AXMConversationMessage>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentServiceImpl, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMCommentServiceImpl>;
}

declare class AXMCommentPopupComponent extends AXBasePageComponent {
    refrenceType: _angular_core.InputSignal<string>;
    refrenceId: _angular_core.InputSignal<string>;
    subject: _angular_core.InputSignal<string>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentPopupComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMCommentPopupComponent, "axm-comment-popup", never, { "refrenceType": { "alias": "refrenceType"; "required": true; "isSignal": true; }; "refrenceId": { "alias": "refrenceId"; "required": true; "isSignal": true; }; "subject": { "alias": "subject"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class AXMCommentWidgetViewComponent extends AXPValueWidgetComponent<AXPEntityReference & {
    subject: string;
}> {
    protected refrenceType: _angular_core.Signal<any>;
    protected refrenceId: _angular_core.Signal<any>;
    protected subject: _angular_core.Signal<any>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentWidgetViewComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMCommentWidgetViewComponent, "ng-component", never, {}, {}, never, never, true, never>;
}

declare const AXPCommentWidget: AXPWidgetConfig;

declare class AXMCommentPopupStartAction extends AXPWorkflowAction {
    private popupService;
    private translate;
    execute(context: AXPWorkflowContext): Promise<void>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMCommentPopupStartAction, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMCommentPopupStartAction>;
}
declare const AXMCommentPopupWorkflow: AXPWorkflow;

export { AXMChatComponent, AXMChatItemComponent, AXMChatManagementService, AXMChatPreviewComponent, AXMChatRealtimeService, AXMChatRealtimeServiceImpl, AXMChatService, AXMChatServiceImpl, AXMCommentComponent, AXMCommentManagementService, AXMCommentPopupComponent, AXMCommentPopupStartAction, AXMCommentPopupWorkflow, AXMCommentRealtimeService, AXMCommentRealtimeServiceImpl, AXMCommentService, AXMCommentServiceImpl, AXMCommentWidgetViewComponent, AXMConversationModule, AXMConversationTabEntityModule, AXMConversationTabService, AXMConversationTabServiceImpl, AXMMessageEntityModule, AXMMessageService, AXMMessageServiceImpl, AXMRoomEntityModule, AXMRoomService, AXMRoomServiceImpl, AXPCommentWidget, RootConfig, messageFactory, roomFactory, tabFactory };
export type { AXMChatMessage, AXMChatMessageEvent, AXMChatRoom, AXMChatRoomEvent, AXMChatTabEvent, AXMComment, AXMCommentEntityData, AXMCommentEvent, AXMCommentEventType, AXMCommentThread, AXMConversationMessage, AXMConversationReaction, AXMConversationRoom, AXMConversationSeen, AXMConversationTab, AXMReactionType, AXMSeenType, AXMThreadEvent, AXMThreadEventType };
