import type { TFunction } from 'i18next'; import type { MessageResponse, Mute, StreamChat, UserResponse } from 'open-chat-js'; import type { PinPermissions } from './hooks'; import type { MessageProps } from './types'; import type { MessageContextValue, StreamMessage } from '../../context'; import type { DefaultStreamChatGenerics } from '../../types/types'; /** * Following function validates a function which returns notification message. * It validates if the first parameter is function and also if return value of function is string or no. */ export declare const validateAndGetMessage: (func: (...args: T) => unknown, args: T) => string | null; /** * Tell if the owner of the current message is muted */ export declare const isUserMuted: (message: StreamMessage, mutes?: Mute[] | undefined) => boolean; export declare const MESSAGE_ACTIONS: { delete: string; edit: string; flag: string; markUnread: string; mute: string; pin: string; quote: string; react: string; reply: string; }; export type MessageActionsArray = Array<'delete' | 'edit' | 'flag' | 'mute' | 'pin' | 'quote' | 'react' | 'reply' | T>; export declare const defaultPinPermissions: PinPermissions; export type Capabilities = { canDelete?: boolean; canEdit?: boolean; canFlag?: boolean; canMarkUnread?: boolean; canMute?: boolean; canPin?: boolean; canQuote?: boolean; canReact?: boolean; canReply?: boolean; }; export declare const getMessageActions: (actions: MessageActionsArray | boolean, { canDelete, canEdit, canFlag, canMarkUnread, canMute, canPin, canQuote, canReact, canReply, }: Capabilities) => MessageActionsArray; export declare const ACTIONS_NOT_WORKING_IN_THREAD: string[]; export declare const showMessageActionsBox: (actions: MessageActionsArray, inThread?: boolean | undefined) => boolean; export declare const areMessagePropsEqual: (prevProps: MessageProps & { mutes?: Mute[] | undefined; showDetailedReactions?: boolean | undefined; }, nextProps: MessageProps & { mutes?: Mute[] | undefined; showDetailedReactions?: boolean | undefined; }) => boolean; export declare const areMessageUIPropsEqual: (prevProps: MessageContextValue & { showDetailedReactions?: boolean | undefined; }, nextProps: MessageContextValue & { showDetailedReactions?: boolean | undefined; }) => boolean; export declare const messageHasReactions: (message?: StreamMessage | undefined) => boolean; export declare const messageHasAttachments: (message?: StreamMessage | undefined) => boolean; export declare const getImages: (message?: MessageResponse | undefined) => import("open-chat-js").Attachment[]; export declare const getNonImageAttachments: (message?: MessageResponse | undefined) => import("open-chat-js").Attachment[]; export interface TooltipUsernameMapper { (user: UserResponse): string; } /** * Default Tooltip Username mapper implementation. * * @param user the user. */ export declare const mapToUserNameOrId: TooltipUsernameMapper; export declare const getReadByTooltipText: (users: UserResponse[], t: TFunction, client: StreamChat, tooltipUserNameMapper: TooltipUsernameMapper) => string; export declare const isOnlyEmojis: (text?: string) => boolean; export declare const isMessageBounced: (message: Pick, "type" | "moderation_details">) => boolean; //# sourceMappingURL=utils.d.ts.map