import type { LocalMessage, MessageResponse, StreamChat, UserMuteResponse, UserResponse } from 'stream-chat'; import type { MessageProps } from './types'; import type { MessageContextValue } from '../../context'; import type { StreamTFunction } from '../../i18n/types'; /** * Calls `func` with `args` and returns the result when it is a string, otherwise null. * * @param func - Function returning a notification message. Null is returned when not a function. * @param args - Arguments for `func`. A non-array value is wrapped in an array. * @returns The string `func` returned, or null. */ export declare const validateAndGetMessage: (func: (...args: T) => unknown, args: T) => string | null; /** * Whether the author of the message is muted. * * @param message - Message whose author is checked. * @param mutes - Muted users. False is returned when it is missing. * @returns True when the author is among the muted users. */ export declare const isUserMuted: (message: LocalMessage, mutes?: UserMuteResponse[]) => boolean; /** `MessageActionSetItem['type']`s that a thread reply does not support. */ export declare const ACTIONS_NOT_WORKING_IN_THREAD: string[]; type MemoizedMessageProps = MessageProps & Pick & { showDetailedReactions?: boolean; }; export declare const areMessagePropsEqual: (prevProps: MemoizedMessageProps, nextProps: MemoizedMessageProps) => boolean; export declare const areMessageUIPropsEqual: (prevProps: MessageContextValue & { showDetailedReactions?: boolean; }, nextProps: MessageContextValue & { showDetailedReactions?: boolean; }) => boolean; export declare const messageHasReactions: (message?: LocalMessage) => boolean; export declare const messageHasQuotedMessage: (message?: LocalMessage) => boolean; export declare const messageHasAttachments: (message?: LocalMessage) => boolean; export declare const messageHasSingleAttachment: (message?: LocalMessage) => boolean; export declare const messageHasGiphyAttachment: (message?: LocalMessage) => boolean; export declare const getImages: (message?: MessageResponse) => import("stream-chat").Attachment[]; export declare const getNonImageAttachments: (message?: MessageResponse) => import("stream-chat").Attachment[]; export interface TooltipUsernameMapper { (user: UserResponse): string; } /** * Default tooltip username mapper. * * @param user - User to map. * @returns The user's name, falling back to the ID. */ export declare const mapToUserNameOrId: TooltipUsernameMapper; export declare const getReadByTooltipText: (users: UserResponse[], t: StreamTFunction, client: StreamChat, tooltipUserNameMapper: TooltipUsernameMapper) => string; export declare const countEmojis: (text?: string) => number; export declare const messageTextHasEmojisOnly: (message: LocalMessage) => boolean; export declare const isMessageErrorRetryable: (message: LocalMessage) => boolean; export declare const isNetworkSendFailure: (message: Pick) => boolean; export declare const isMessageBounced: (message: Pick) => boolean; export declare const isMessageBlocked: (message: Pick) => boolean; export declare const isMessageDeleted: (message: LocalMessage) => boolean; export declare const isMessageEdited: (message: Pick) => boolean; export {}; //# sourceMappingURL=utils.d.ts.map