import React, { ComponentProps } from 'react'; import { StyleProp, ViewStyle, TextStyle, Pressable } from 'react-native'; import { MessageReplyProps } from '../components/MessageReply'; import { MessageImageProps } from '../MessageImage'; import { MessageTextProps } from '../MessageText'; import { User, IMessage, LeftRightStyle, Reply, ReplyMessage, Omit, MessageVideoProps, MessageAudioProps, MessageLocationProps, MessageMenuItem } from '../Models'; import { QuickRepliesProps } from '../QuickReplies'; import { ReactionsProps } from '../Reactions'; import { MessageReplyStyleProps } from '../Reply'; import { TimeProps } from '../Time'; export type RenderMessageImageProps = Omit, 'containerStyle' | 'wrapperStyle'> & MessageImageProps; export type RenderMessageVideoProps = Omit, 'containerStyle' | 'wrapperStyle'> & MessageVideoProps; export type RenderMessageAudioProps = Omit, 'containerStyle' | 'wrapperStyle'> & MessageAudioProps; export type RenderMessageLocationProps = Omit, 'containerStyle' | 'wrapperStyle'> & MessageLocationProps; export type RenderMessageTextProps = Omit, 'containerStyle' | 'wrapperStyle'> & MessageTextProps; /** Props for message reply functionality in bubble */ export interface BubbleReplyProps extends MessageReplyStyleProps { /** Custom render for message reply; rendered on top of message content */ renderMessageReply?: (props: MessageReplyProps) => React.ReactNode; /** Callback when message reply is pressed */ onPress?: (replyMessage: ReplyMessage) => void; } export interface BubbleProps { user?: User; touchableProps?: ComponentProps; isUsernameVisible?: boolean; isCustomViewBottom?: boolean; isInverted?: boolean; position: 'left' | 'right'; currentMessage: TMessage; nextMessage?: TMessage; previousMessage?: TMessage; containerStyle?: LeftRightStyle; wrapperStyle?: LeftRightStyle; textStyle?: LeftRightStyle; bottomContainerStyle?: LeftRightStyle; tickStyle?: StyleProp; containerToNextStyle?: LeftRightStyle; containerToPreviousStyle?: LeftRightStyle; usernameStyle?: TextStyle; quickReplyStyle?: StyleProp; quickReplyTextStyle?: StyleProp; quickReplyContainerStyle?: StyleProp; messageTextProps?: Partial>; onPressMessage?: (context?: unknown, message?: unknown) => void; onLongPressMessage?: (context?: unknown, message?: unknown) => void; onQuickReply?: (replies: Reply[]) => void; renderMessageImage?: (props: RenderMessageImageProps) => React.ReactNode; renderMessageVideo?: (props: RenderMessageVideoProps) => React.ReactNode; renderMessageAudio?: (props: RenderMessageAudioProps) => React.ReactNode; renderMessageLocation?: (props: RenderMessageLocationProps) => React.ReactNode; renderMessageText?: (props: RenderMessageTextProps) => React.ReactNode; renderCustomView?: (bubbleProps: BubbleProps) => React.ReactNode; renderTime?: (timeProps: TimeProps) => React.ReactNode; renderTicks?: (currentMessage: TMessage) => React.ReactNode; renderUsername?: (user?: TMessage['user']) => React.ReactNode; renderQuickReplySend?: () => React.ReactNode; renderQuickReplies?: (quickReplies: QuickRepliesProps) => React.ReactNode; /** Message reply configuration */ messageReply?: BubbleReplyProps; /** Emoji reactions configuration */ reactions?: ReactionsProps; /** Telegram-style long-press context menu actions (array or per-message function) */ messageActions?: MessageMenuItem[] | ((message: TMessage) => MessageMenuItem[]); /** * Controls whether the bubble attaches its tap / long-press gestures, which * `reactions` and `messageActions` rely on. Pass `false` (or a predicate * returning `false`) for messages that render natively interactive content - * a video player with its own controls, a map, a WebView - whose touches * must not compete with the bubble. * Note: with gestures off, that message can no longer open the reaction * picker or the context menu. * @default true */ isMessageGestureEnabled?: boolean | ((message: TMessage) => boolean); } //# sourceMappingURL=types.d.ts.map