import PropTypes from 'prop-types'; import React from 'react'; import { StyleProp, ViewStyle, TextStyle } from 'react-native'; import { QuickRepliesProps } from './QuickReplies'; import { MessageTextProps } from './MessageText'; import { MessageImageProps } from './MessageImage'; import { TimeProps } from './Time'; import { User, IMessage, LeftRightStyle, Reply, Omit, MessageVideoProps, MessageAudioProps } from './Models'; export declare type RenderMessageImageProps = Omit, 'containerStyle' | 'wrapperStyle'> & MessageImageProps; export declare type RenderMessageVideoProps = Omit, 'containerStyle' | 'wrapperStyle'> & MessageVideoProps; export declare type RenderMessageAudioProps = Omit, 'containerStyle' | 'wrapperStyle'> & MessageAudioProps; export declare type RenderMessageTextProps = Omit, 'containerStyle' | 'wrapperStyle'> & MessageTextProps; export interface BubbleProps { user?: User; touchableProps?: object; renderUsernameOnMessage?: boolean; isCustomViewBottom?: boolean; inverted?: boolean; position: 'left' | 'right'; currentMessage?: TMessage; nextMessage?: TMessage; previousMessage?: TMessage; optionTitles?: string[]; containerStyle?: LeftRightStyle; wrapperStyle?: LeftRightStyle; textStyle?: LeftRightStyle; bottomContainerStyle?: LeftRightStyle; tickStyle?: StyleProp; containerToNextStyle?: LeftRightStyle; containerToPreviousStyle?: LeftRightStyle; usernameStyle?: TextStyle; quickReplyStyle?: StyleProp; quickReplyTextStyle?: StyleProp; onPress?(context?: any, message?: any): void; onLongPress?(context?: any, message?: any): 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?(): React.ReactNode; renderQuickReplySend?(): React.ReactNode; renderQuickReplies?(quickReplies: QuickRepliesProps): React.ReactNode; } export default class Bubble extends React.Component> { static contextType: React.Context; static defaultProps: { touchableProps: {}; onPress: null; onLongPress: null; renderMessageImage: null; renderMessageVideo: null; renderMessageAudio: null; renderMessageText: null; renderCustomView: null; renderUsername: null; renderTicks: null; renderTime: null; renderQuickReplies: null; onQuickReply: null; position: string; optionTitles: string[]; currentMessage: { text: null; createdAt: null; image: null; }; nextMessage: {}; previousMessage: {}; containerStyle: {}; wrapperStyle: {}; bottomContainerStyle: {}; tickStyle: {}; usernameStyle: {}; containerToNextStyle: {}; containerToPreviousStyle: {}; }; static propTypes: { user: PropTypes.Validator; touchableProps: PropTypes.Requireable; onLongPress: PropTypes.Requireable<(...args: any[]) => any>; renderMessageImage: PropTypes.Requireable<(...args: any[]) => any>; renderMessageVideo: PropTypes.Requireable<(...args: any[]) => any>; renderMessageAudio: PropTypes.Requireable<(...args: any[]) => any>; renderMessageText: PropTypes.Requireable<(...args: any[]) => any>; renderCustomView: PropTypes.Requireable<(...args: any[]) => any>; isCustomViewBottom: PropTypes.Requireable; renderUsernameOnMessage: PropTypes.Requireable; renderUsername: PropTypes.Requireable<(...args: any[]) => any>; renderTime: PropTypes.Requireable<(...args: any[]) => any>; renderTicks: PropTypes.Requireable<(...args: any[]) => any>; renderQuickReplies: PropTypes.Requireable<(...args: any[]) => any>; onQuickReply: PropTypes.Requireable<(...args: any[]) => any>; position: PropTypes.Requireable; optionTitles: PropTypes.Requireable<(string | null | undefined)[]>; currentMessage: PropTypes.Requireable; nextMessage: PropTypes.Requireable; previousMessage: PropTypes.Requireable; containerStyle: PropTypes.Requireable; right: PropTypes.Requireable; }>>; wrapperStyle: PropTypes.Requireable; right: PropTypes.Requireable; }>>; bottomContainerStyle: PropTypes.Requireable; right: PropTypes.Requireable; }>>; tickStyle: PropTypes.Requireable; usernameStyle: PropTypes.Requireable; containerToNextStyle: PropTypes.Requireable; right: PropTypes.Requireable; }>>; containerToPreviousStyle: PropTypes.Requireable; right: PropTypes.Requireable; }>>; }; onPress: () => void; onLongPress: () => void; styledBubbleToNext(): (StyleProp | { borderBottomLeftRadius: number; } | { borderBottomRightRadius: number; })[] | null; styledBubbleToPrevious(): (StyleProp | { borderTopLeftRadius: number; } | { borderTopRightRadius: number; })[] | null; renderQuickReplies(): React.ReactNode; renderMessageText(): React.ReactNode; renderMessageImage(): React.ReactNode; renderMessageVideo(): React.ReactNode; renderMessageAudio(): React.ReactNode; renderTicks(): React.ReactNode; renderTime(): React.ReactNode; renderUsername(): JSX.Element | null; renderCustomView(): React.ReactNode; renderBubbleContent(): JSX.Element; render(): JSX.Element; }