import { AttachmentManager } from './attachmentManager';
import { CustomDataManager } from './CustomDataManager';
import { LinkPreviewsManager } from './linkPreviewsManager';
import { PollComposer } from './pollComposer';
import { TextComposer } from './textComposer';
import type { MessageComposerMiddlewareValue } from './middleware';
import { MessageComposerMiddlewareExecutor, MessageDraftComposerMiddlewareExecutor } from './middleware';
import { StateStore } from '../store';
import { generateUUIDv4 } from '../utils';
import { Channel } from '../channel';
import { Thread } from '../thread';
import type { DraftResponse, LocalMessage, LocalMessageBase, MessageResponse } from '../types';
import type { StreamChat } from '../client';
import type { MessageComposerConfig } from './configuration/types';
import type { DeepPartial } from '../types.utility';
import type { Unsubscribe } from '../store';
import { WithSubscriptions } from '../utils/WithSubscriptions';
type UnregisterSubscriptions = Unsubscribe;
export type LastComposerChange = {
    draftUpdate: number | null;
    stateUpdate: number;
};
export type EditingAuditState = {
    lastChange: LastComposerChange;
};
export type LocalMessageWithLegacyThreadId = LocalMessage & {
    legacyThreadId?: string;
};
export type CompositionContext = Channel | Thread | LocalMessageWithLegacyThreadId;
export type MessageComposerState = {
    id: string;
    draftId: string | null;
    pollId: string | null;
    quotedMessage: LocalMessageBase | null;
    showReplyInChannel: boolean;
};
export type MessageComposerOptions = {
    client: StreamChat;
    compositionContext: CompositionContext;
    composition?: DraftResponse | MessageResponse | LocalMessage;
    config?: DeepPartial<MessageComposerConfig>;
};
export declare class MessageComposer extends WithSubscriptions {
    readonly channel: Channel;
    readonly state: StateStore<MessageComposerState>;
    readonly editingAuditState: StateStore<EditingAuditState>;
    readonly configState: StateStore<MessageComposerConfig>;
    readonly compositionContext: CompositionContext;
    readonly compositionMiddlewareExecutor: MessageComposerMiddlewareExecutor;
    readonly draftCompositionMiddlewareExecutor: MessageDraftComposerMiddlewareExecutor;
    editedMessage?: LocalMessage;
    attachmentManager: AttachmentManager;
    linkPreviewsManager: LinkPreviewsManager;
    textComposer: TextComposer;
    pollComposer: PollComposer;
    customDataManager: CustomDataManager;
    constructor({ composition, config, compositionContext, client, }: MessageComposerOptions);
    static evaluateContextType(compositionContext: CompositionContext): "message" | "channel" | "thread" | "legacy_thread";
    static constructTag(compositionContext: CompositionContext): `${ReturnType<typeof MessageComposer.evaluateContextType>}_${string}`;
    get config(): MessageComposerConfig;
    updateConfig(config: DeepPartial<MessageComposerConfig>): void;
    get contextType(): "message" | "channel" | "thread" | "legacy_thread";
    get tag(): `message_${string}` | `channel_${string}` | `thread_${string}` | `legacy_thread_${string}`;
    get threadId(): string | null;
    get client(): StreamChat;
    get id(): string;
    get draftId(): string | null;
    get lastChange(): LastComposerChange;
    get quotedMessage(): LocalMessageBase | null;
    get pollId(): string | null;
    get showReplyInChannel(): boolean;
    get hasSendableData(): boolean;
    get compositionIsEmpty(): boolean;
    get lastChangeOriginIsLocal(): boolean;
    static generateId: typeof generateUUIDv4;
    initState: ({ composition, }?: {
        composition?: DraftResponse | MessageResponse | LocalMessage;
    }) => void;
    initEditingAuditState: (composition?: DraftResponse | MessageResponse | LocalMessage) => EditingAuditState;
    private logStateUpdateTimestamp;
    private logDraftUpdateTimestamp;
    registerSubscriptions: () => UnregisterSubscriptions;
    private subscribeMessageUpdated;
    private subscribeMessageComposerSetupStateChange;
    private subscribeMessageDeleted;
    private subscribeDraftUpdated;
    private subscribeDraftDeleted;
    private subscribeTextComposerStateChanged;
    private subscribeAttachmentManagerStateChanged;
    private subscribeLinkPreviewsManagerStateChanged;
    private subscribePollComposerStateChanged;
    private subscribeCustomDataManagerStateChanged;
    private subscribeMessageComposerStateChanged;
    private subscribeMessageComposerConfigStateChanged;
    setQuotedMessage: (quotedMessage: LocalMessage | null) => void;
    toggleShowReplyInChannel: () => void;
    clear: () => void;
    restore: () => void;
    compose: () => Promise<MessageComposerMiddlewareValue["state"] | undefined>;
    composeDraft: () => Promise<import("..").MessageDraftComposerMiddlewareValueState | undefined>;
    createDraft: () => Promise<void>;
    deleteDraft: () => Promise<void>;
    createPoll: () => Promise<void>;
}
export {};
