import { TemplateRef } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import type { Attachment, Channel, ChannelFilters, ChannelMemberResponse, CommandResponse, Event, ExtendableGenerics, FormatMessageResponse, LiteralStringForUnion, MessageResponseBase, Mute, ReactionResponse, User, UserResponse } from 'stream-chat';
import { AttachmentService } from './attachment.service';
import { Icon } from './icon/icon.component';
export declare type UnknownType = Record<string, unknown>;
export declare type CustomTrigger = {
    [key: string]: {
        componentProps: UnknownType;
        data: UnknownType;
    };
};
export declare type DefaultStreamChatGenerics = ExtendableGenerics & {
    attachmentType: DefaultAttachmentType;
    channelType: DefaultChannelType;
    commandType: LiteralStringForUnion;
    eventType: UnknownType;
    messageType: DefaultMessageType;
    reactionType: UnknownType;
    userType: DefaultUserType;
};
export declare type DefaultAttachmentType = UnknownType & {
    asset_url?: string;
    id?: string;
    images?: Array<Attachment<DefaultStreamChatGenerics>>;
    mime_type?: string;
    isCustomAttachment?: boolean;
};
export declare type DefaultChannelType = UnknownType & {
    image?: string;
    member_count?: number;
    subtitle?: string;
};
export declare type DefaultCommandType = LiteralStringForUnion;
export declare type DefaultMessageType = UnknownType & {
    customType?: 'channel.intro' | 'message.date';
    date?: string | Date;
    errorStatusCode?: number;
    event?: Event<DefaultStreamChatGenerics>;
    unread?: boolean;
    readBy: UserResponse<DefaultStreamChatGenerics>[];
    translation?: string;
    quoted_message?: MessageResponseBase<DefaultStreamChatGenerics>;
};
export declare type DefaultUserTypeInternal = {
    image?: string;
    status?: string;
};
export declare type DefaultUserType = UnknownType & DefaultUserTypeInternal & {
    mutes?: Array<Mute<DefaultStreamChatGenerics>>;
};
export declare type StreamMessage<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = FormatMessageResponse<T>;
export declare type AttachmentUploadErrorReason = 'file-size' | 'file-extension' | 'unknown';
export declare type AttachmentUpload<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    file: File;
    state: 'error' | 'success' | 'uploading';
    errorReason?: AttachmentUploadErrorReason;
    errorExtraInfo?: {
        param: string;
    }[];
    url?: string;
    type: 'image' | 'file' | 'video';
    previewUri?: string | ArrayBuffer;
    thumb_url?: string;
    fromAttachment?: Attachment<T>;
};
export declare type MentionAutcompleteListItemContext = {
    item: MentionAutcompleteListItem;
};
export declare type CommandAutocompleteListItemContext = {
    item: ComandAutocompleteListItem;
};
export declare type MentionAutcompleteListItem = (ChannelMemberResponse | UserResponse) & {
    autocompleteLabel: string;
};
export declare type ComandAutocompleteListItem = CommandResponse & {
    autocompleteLabel: string;
};
export declare type NotificationType = 'success' | 'error' | 'info';
export declare type NotificationPayload<T = object> = {
    id: string;
    type: NotificationType;
    text?: string;
    translateParams?: object;
    template?: TemplateRef<T>;
    templateContext?: T;
    dismissFn: () => void;
};
export declare type ChannelPreviewContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    channel: Channel<T>;
};
export declare type ChannelPreviewInfoContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = ChannelPreviewContext & {
    latestMessage?: StreamMessage<T>;
    /**
     * The text of the latest message, or some meta information (for example: "Nothing yet")
     */
    latestMessageText: string;
    /**
     * The title of the channel, or the name of the channel members
     */
    channelDisplayTitle: string;
    /**
     * The status of the last message (only available if the last message was sent by the current user)
     */
    latestMessageStatus?: 'delivered' | 'read';
    /**
     * The time of the last message (formatted to a user-friendly string)
     */
    latestMessageTime?: string;
    unreadCount: number;
};
export declare type MentionTemplateContext = {
    content: string;
    user: UserResponse;
};
export declare type EmojiPickerContext = {
    emojiInput$: Subject<string>;
};
export declare type TypingIndicatorContext = {
    usersTyping$: Observable<UserResponse<DefaultStreamChatGenerics>[]>;
};
export declare type MessageContext = {
    message: StreamMessage | undefined;
    enabledMessageActions: string[];
    isLastSentMessage: boolean | undefined;
    mode: 'thread' | 'main';
    isHighlighted: boolean;
    customActions: CustomMessageActionItem[];
    scroll$?: Observable<void>;
};
export declare type ChannelActionsContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    channel: Channel<T>;
};
export declare type AttachmentListContext = {
    messageId: string;
    attachments: Attachment<DefaultStreamChatGenerics>[];
    parentMessageId?: string;
    imageModalStateChangeHandler?: (state: 'opened' | 'closed') => void;
};
export declare type AvatarType = 'channel' | 'user';
export declare type AvatarLocation = 'channel-preview' | 'channel-header' | 'message-sender' | 'message-reader' | 'quoted-message-sender' | 'autocomplete-item' | 'typing-indicator' | 'reaction';
export declare type AvatarContext = {
    name: string | undefined;
    imageUrl: string | undefined;
    type: AvatarType | undefined;
    location: AvatarLocation | undefined;
    channel?: Channel<DefaultStreamChatGenerics>;
    user?: User<DefaultStreamChatGenerics>;
    initialsType?: 'first-letter-of-first-word' | 'first-letter-of-each-word';
    showOnlineIndicator?: boolean;
};
export declare type AttachmentPreviewListContext = {
    attachmentUploads$: Observable<AttachmentUpload[]> | undefined;
    retryUploadHandler: (f: File) => void;
    deleteUploadHandler: (u: AttachmentUpload) => void;
};
export declare type IconContext = {
    icon: Icon | undefined;
};
export declare type MessageActionsBoxContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    isMine: boolean;
    message: StreamMessage<T> | undefined;
    enabledActions: string[];
    messageTextHtmlElement: HTMLElement | undefined;
};
export declare type MessageActionHandlerExtraParams = {
    isMine: boolean;
    messageTextHtmlElement?: HTMLElement;
};
export declare type MessageActionHandler<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = (message: StreamMessage<T>, params: MessageActionHandlerExtraParams) => void;
export declare type MessageActionBoxItemContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    actionName: string;
    actionLabelOrTranslationKey: ((message: StreamMessage<T>) => string) | string;
    message: StreamMessage<T>;
    actionHandlerExtraParams: MessageActionHandlerExtraParams;
    actionHandler: MessageActionHandler<T>;
};
export declare type MessageReactionActionItem<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    actionName: 'react';
    isVisible: (enabledActions: string[], isMine: boolean, message: StreamMessage<T>) => boolean;
};
declare type MessageActionItemBase<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    actionLabelOrTranslationKey: ((message: StreamMessage<T>) => string) | string;
    isVisible: (enabledActions: string[], isMine: boolean, message: StreamMessage<T>) => boolean;
    actionHandler: MessageActionHandler;
};
export declare type MessageActionItem<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = MessageActionItemBase<T> & {
    actionName: 'quote' | 'pin' | 'flag' | 'edit' | 'delete' | 'mark-unread' | 'thread-reply' | 'copy-message-text';
};
export declare type CustomMessageActionItem<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = MessageActionItemBase<T> & {
    actionName: string;
};
export declare type MessageReactionsSelectorContext = {
    messageId: string | undefined;
    ownReactions: ReactionResponse<DefaultStreamChatGenerics>[];
};
export declare type MessageReactionsContext = {
    messageId: string | undefined;
    messageReactionCounts: {
        [key in MessageReactionType]?: number;
    };
    latestReactions: ReactionResponse<DefaultStreamChatGenerics>[];
    ownReactions: ReactionResponse<DefaultStreamChatGenerics>[];
};
export declare type ModalContext = {
    isOpen: boolean;
    isOpenChangeHandler: (isOpen: boolean) => void;
    content: TemplateRef<void>;
};
export declare type NotificationContext = {
    type: NotificationType | undefined;
    content: TemplateRef<void> | undefined;
};
export declare type ThreadHeaderContext = {
    parentMessage: StreamMessage | undefined;
    closeThreadHandler: () => void;
};
export declare type MessageReactionType = string;
export declare type AttachmentConfigration = {
    url: string;
    height: string;
    width: string;
};
export declare type ImageAttachmentConfiguration = AttachmentConfigration & {
    originalHeight: number;
    originalWidth: number;
};
export declare type VideoAttachmentConfiguration = ImageAttachmentConfiguration & {
    thumbUrl?: string;
};
export declare type DeliveredStatusContext = {
    message: StreamMessage;
};
export declare type SendingStatusContext = {
    message: StreamMessage;
};
export declare type CustomMetadataContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    message: StreamMessage<T>;
};
export declare type ReadStatusContext = {
    message: StreamMessage;
    readByText: string;
};
export declare type ChannelHeaderInfoContext<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    channel: Channel<T>;
};
export declare type CustomAttachmentUploadContext = {
    isMultipleFileUploadEnabled: boolean | undefined;
    attachmentService: AttachmentService;
};
export declare type AttachmentContext = {
    attachment: Attachment<DefaultStreamChatGenerics>;
};
export declare type SystemMessageContext = MessageContext & {
    parsedDate: string | undefined;
};
export declare type DateSeparatorContext = {
    date: Date;
    parsedDate: string;
};
export declare type UnreadMessagesIndicatorContext = {
    unreadCount: number;
};
export declare type UnreadMessagesNotificationContext = UnreadMessagesIndicatorContext & {
    onJump: () => void;
    onDismiss: () => void;
};
export declare type ChannelQueryState = {
    state: 'in-progress' | 'success' | 'error';
    error?: unknown;
};
export declare type MessageInput<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    text: string;
    attachments: Attachment<T>[];
    mentionedUsers: UserResponse<T>[];
    parentId: string | undefined;
    quotedMessageId: string | undefined;
    customData: undefined | Partial<T['messageType']>;
};
export declare type OffsetNextPageConfiguration = {
    type: 'offset';
    offset: number;
};
export declare type FiltertNextPageConfiguration<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    type: 'filter';
    paginationFilter: ChannelFilters<T>;
};
export declare type NextPageConfiguration = OffsetNextPageConfiguration | FiltertNextPageConfiguration | undefined;
export declare type MessageReactionClickDetails = {
    messageId: string;
    reactionType: string;
};
export declare type MessageActionsClickDetails<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = MessageActionsBoxContext<T> & {
    customActions: CustomMessageActionItem[];
};
export declare type GroupStyleOptions = {
    noGroupByUser?: boolean;
    lastReadMessageId?: string;
    noGroupByReadState?: boolean;
};
export declare type ChannelQueryType = 'first-page' | 'next-page' | 'recover-state';
export declare type ChannelQueryResult<T extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
    channels: Channel<T>[];
    hasMorePage: boolean;
};
export declare type VirtualizedListScrollPosition = 'top' | 'bottom' | 'middle';
export declare type VirtualizedListQueryState = {
    state: 'loading-top' | 'loading-bottom' | 'success' | 'error';
    error?: unknown;
};
export declare type VirtualizedListQueryDirection = 'top' | 'bottom';
export declare type VirtualizedListVerticalItemPosition = 'top' | 'bottom' | 'middle';
export {};
