/// <reference types="react" />
import { CUSTOM_MESSAGE_TYPE } from '../../constants/messageTypes';
import type { LocalMessage, MessageLabel } from 'stream-chat';
type IntroMessage = {
    customType: typeof CUSTOM_MESSAGE_TYPE.intro;
    id: string;
};
type DateSeparatorMessage = {
    customType: typeof CUSTOM_MESSAGE_TYPE.date;
    date: Date;
    id: string;
    type: MessageLabel;
    unread: boolean;
};
export type RenderedMessage = LocalMessage | DateSeparatorMessage | IntroMessage;
type ProcessMessagesContext = {
    /** the connected user ID */
    userId: string;
    /** Enable date separator */
    enableDateSeparator?: boolean;
    /** Enable deleted messages to be filtered out of resulting message list */
    hideDeletedMessages?: boolean;
    /** Disable date separator display for unread incoming messages */
    hideNewMessageSeparator?: boolean;
    /** Sets the threshold after everything is considered unread */
    lastRead?: Date | null;
};
export type ProcessMessagesParams = ProcessMessagesContext & {
    messages: LocalMessage[];
    reviewProcessedMessage?: (params: {
        /** array of messages representing the changes applied around a given processed message */
        changes: RenderedMessage[];
        /** configuration params and information forwarded from `processMessages` */
        context: ProcessMessagesContext;
        /** index of the processed message in the original messages array */
        index: number;
        /** array of messages retrieved from the back-end */
        messages: LocalMessage[];
        /** newly built array of messages to be later rendered */
        processedMessages: RenderedMessage[];
    }) => LocalMessage[];
    /** Signals whether to separate giphy preview as well as used to set the giphy preview state */
    setGiphyPreviewMessage?: React.Dispatch<React.SetStateAction<LocalMessage | undefined>>;
};
/**
 * processMessages - Transform the input message list according to config parameters
 *
 * Inserts date separators btw. messages created on different dates or before unread incoming messages. By default:
 * - enabled in main message list
 * - disabled in virtualized message list
 * - disabled in thread
 *
 * Allows to filter out deleted messages, contolled by hideDeletedMessages param. This is disabled by default.
 *
 * Sets Giphy preview message for VirtualizedMessageList
 *
 * The only required params are messages and userId, the rest are config params:
 *
 * @return {LocalMessage[]} Transformed list of messages
 */
export declare const processMessages: (params: ProcessMessagesParams) => RenderedMessage[];
export declare const makeIntroMessage: () => IntroMessage;
export declare const makeDateMessageId: (date?: string | Date) => string;
export declare const getLastReceived: (messages: RenderedMessage[]) => string | null;
export declare const insertIntro: (messages: RenderedMessage[], headerPosition?: number) => RenderedMessage[];
export type GroupStyle = '' | 'middle' | 'top' | 'bottom' | 'single';
export declare const getGroupStyles: (message: RenderedMessage, previousMessage: RenderedMessage, nextMessage: RenderedMessage, noGroupByUser: boolean, maxTimeBetweenGroupedMessages?: number) => GroupStyle;
export declare const hasMoreMessagesProbably: (returnedCountMessages: number, limit: number) => boolean;
export declare const hasNotMoreMessages: (returnedCountMessages: number, limit: number) => boolean;
export declare function isIntroMessage(message: unknown): message is IntroMessage;
export declare function isDateSeparatorMessage(message: unknown): message is DateSeparatorMessage;
export declare function isLocalMessage(message: unknown): message is LocalMessage;
export declare const getIsFirstUnreadMessage: ({ firstUnreadMessageId, isFirstMessage, lastReadDate, lastReadMessageId, message, previousMessage, unreadMessageCount, }: {
    isFirstMessage: boolean;
    message: LocalMessage;
    firstUnreadMessageId?: string;
    lastReadDate?: Date;
    lastReadMessageId?: string;
    previousMessage?: RenderedMessage;
    unreadMessageCount?: number;
}) => boolean;
export {};
