// @flow import * as React from 'react' import type { QuickRepliesProps } from './QuickReplies' import type { MessageImageProps } from './MessageImage' import type { MessageVideoProps } from './MessageVideo' import type { MessageTextProps } from './MessageText' import type { TimeProps } from './Time' import type { User, IMessage, LeftRightStyle, Reply } from './types' import type { TextStyleProp, ViewStyleProp, } from 'react-native/Libraries/StyleSheet/StyleSheet' export type RenderMessageImageProps = $Diff< BubbleProps, {| containerStyle: *, wrapperStyle: * |}, > & MessageImageProps export type RenderMessageVideoProps = $Diff< BubbleProps, {| containerStyle: *, wrapperStyle: * |}, > & MessageVideoProps export type RenderMessageTextProps = $Diff< BubbleProps, {| containerStyle: *, wrapperStyle: * |}, > & MessageTextProps export type BubbleProps = $ReadOnly<{| user?: User, touchableProps?: Object, renderUsernameOnMessage?: boolean, isCustomViewBottom?: boolean, inverted?: boolean, position: 'left' | 'right', currentMessage: TMessage, nextMessage?: TMessage, previousMessage?: TMessage, optionTitles?: (Array), containerStyle?: LeftRightStyle, wrapperStyle?: LeftRightStyle, textStyle?: LeftRightStyle, bottomContainerStyle?: LeftRightStyle, tickStyle?: TextStyleProp, containerToNextStyle?: LeftRightStyle, containerToPreviousStyle?: LeftRightStyle, usernameStyle?: TextStyleProp, quickReplyStyle?: ViewStyleProp, quickReplyTextStyle?: TextStyleProp, quickReplyContainerStyle?: ViewStyleProp, onLongPress?: (context?: any, message?: any) => void, onQuickReply?: (Array) => void, renderMessageImage?: (RenderMessageImageProps) => React.Node, renderMessageVideo?: (RenderMessageVideoProps) => React.Node, renderMessageText?: (RenderMessageTextProps) => React.Node, renderCustomView?: (BubbleProps) => React.Node, renderTime?: (TimeProps: TMessage) => React.Node, renderTicks?: TMessage => React.Node, renderUsername?: () => React.Node, renderQuickReplySend?: () => React.Node, renderQuickReplies?: (QuickRepliesProps) => React.Node, |}> export default class Bubble< TMessage: IMessage = IMessage, > extends React.Component> {}