import React, { ComponentProps } from 'react' import { StyleProp, ViewStyle, TextStyle, Pressable, } from 'react-native' import { MessageImageProps } from '../MessageImage' import { MessageTextProps } from '../MessageText' import { User, IMessage, LeftRightStyle, Reply, Omit, MessageVideoProps, MessageAudioProps, } from '../Models' import { QuickRepliesProps } from '../QuickReplies' import { TimeProps } from '../Time' export type RenderMessageImageProps = Omit< BubbleProps, 'containerStyle' | 'wrapperStyle' > & MessageImageProps export type RenderMessageVideoProps = Omit< BubbleProps, 'containerStyle' | 'wrapperStyle' > & MessageVideoProps export type RenderMessageAudioProps = Omit< BubbleProps, 'containerStyle' | 'wrapperStyle' > & MessageAudioProps export type RenderMessageTextProps = Omit< BubbleProps, 'containerStyle' | 'wrapperStyle' > & MessageTextProps 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 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 }