<commit_before>import * as React from 'react';
import * as RN from 'react-native';

type Omit<T, K> = Pick<T, Exclude<keyof T, K>>

type ViewStyle = RN.StyleProp<RN.ViewStyle>;
type TextStyle = RN.StyleProp<RN.TextStyle>;
type ImageStyle = RN.StyleProp<RN.ImageStyle>;

export interface LeftRightStyle<T> {
  left: T;
  right: T;
}

export interface User {
  _id: any;
  name?: string;
  avatar?: string;
}

export interface IMessage {
  _id: any;
  text: string;
  createdAt: Date | number;
  user: User;
  image?: string;
  system?: boolean;
}

export type IChatMessage = IMessage;

interface ActionsProps {
  // todo: onSend is not used
  onSend?(): void;
  options?: any;
  optionTintColor?: string;
  icon?(): void;
  wrapperStyle?: ViewStyle;
  containerStyle?: ViewStyle;
  iconTextStyle?: ViewStyle;
  onPressActionButton(): void;
}

export class Actions extends React.Component<ActionsProps> {}

interface AvatarProps<TMessage extends IMessage = IMessage> {
  renderAvatarOnTop: boolean;
  position: 'left' | 'right';
  currentMessage: TMessage;
  previousMessage: TMessage;
  nextMessage: TMessage;
  onPressAvatar(): void;
  renderAvatar(props: AvatarProps<TMessage>): JSX.Element;
  containerStyle: {
    left: any;
    right: any;
  };
  imageStyle: {
    left: any;
    right: any;
  };
  // TODO: remove in next major release
  isSameDay(currentMessage: TMessage, message: TMessage): boolean;
  isSameUser(currentMessage: TMessage, message: TMessage): boolean;
}

export class Avatar extends React.Component<AvatarProps> {}

interface BubbleProps<TMessage extends IMessage = IMessage> {
  user: User;
  touchableProps?: object;
  onLongPress?(context?: any, message?: any): void;
  renderMessageImage?(
    messageImageProps: RenderMessageImageProps,
  ): React.ReactNode;
  renderMessageText?(messageTextProps: MessageTextProps): React.ReactNode;
  renderCustomView?(bubbleProps: BubbleProps): React.ReactNode;
  renderTime?(timeProps: TimeProps): React.ReactNode;
  renderTicks?(currentMessage: TMessage): React.ReactNode;
  renderUsername?(): React.ReactNode;
  renderUsernameOnMessage?: boolean
  position?: "left" | "right";
  currentMessage?: TMessage;
  nextMessage?: TMessage;
  previousMessage?: TMessage;
  containerStyle?: LeftRightStyle<ViewStyle>;
  wrapperStyle: LeftRightStyle<ViewStyle>;
  bottomContainerStyle: LeftRightStyle<ViewStyle>;
  tickStyle: TextStyle;
  containerToNextStyle: LeftRightStyle<ViewStyle>;
  containerToPreviousStyle: LeftRightStyle<ViewStyle>;
  // TODO: remove in next major release
  isSameDay?(currentMessage: TMessage, nextMessage: TMessage): boolean;
  isSameUser?(currentMessage: TMessage, nextMessage: TMessage): boolean;
}

export class Bubble extends React.Component<BubbleProps> {}

interface ComposerProps {
  composerHeight?: number;
  text?: string;
  placeholder?: string;
  placeholderTextColor?: string;
  textInputProps?: Partial<RN.TextInputProps>;
  onTextChanged?(text: string): void;
  onInputSizeChanged?(contentSize: { width: number; height: number }): void;
  multiline?: boolean;<commit_msg>Add textStyle to BubbleProps type<commit_after>import * as React from 'react';
import * as RN from 'react-native';

type Omit<T, K> = Pick<T, Exclude<keyof T, K>>

type ViewStyle = RN.StyleProp<RN.ViewStyle>;
type TextStyle = RN.StyleProp<RN.TextStyle>;
type ImageStyle = RN.StyleProp<RN.ImageStyle>;

export interface LeftRightStyle<T> {
  left: T;
  right: T;
}

export interface User {
  _id: any;
  name?: string;
  avatar?: string;
}

export interface IMessage {
  _id: any;
  text: string;
  createdAt: Date | number;
  user: User;
  image?: string;
  system?: boolean;
}

export type IChatMessage = IMessage;

interface ActionsProps {
  // todo: onSend is not used
  onSend?(): void;
  options?: any;
  optionTintColor?: string;
  icon?(): void;
  wrapperStyle?: ViewStyle;
  containerStyle?: ViewStyle;
  iconTextStyle?: ViewStyle;
  onPressActionButton(): void;
}

export class Actions extends React.Component<ActionsProps> {}

interface AvatarProps<TMessage extends IMessage = IMessage> {
  renderAvatarOnTop: boolean;
  position: 'left' | 'right';
  currentMessage: TMessage;
  previousMessage: TMessage;
  nextMessage: TMessage;
  onPressAvatar(): void;
  renderAvatar(props: AvatarProps<TMessage>): JSX.Element;
  containerStyle: {
    left: any;
    right: any;
  };
  imageStyle: {
    left: any;
    right: any;
  };
  // TODO: remove in next major release
  isSameDay(currentMessage: TMessage, message: TMessage): boolean;
  isSameUser(currentMessage: TMessage, message: TMessage): boolean;
}

export class Avatar extends React.Component<AvatarProps> {}

interface BubbleProps<TMessage extends IMessage = IMessage> {
  user: User;
  touchableProps?: object;
  onLongPress?(context?: any, message?: any): void;
  renderMessageImage?(
    messageImageProps: RenderMessageImageProps,
  ): React.ReactNode;
  renderMessageText?(messageTextProps: MessageTextProps): React.ReactNode;
  renderCustomView?(bubbleProps: BubbleProps): React.ReactNode;
  renderTime?(timeProps: TimeProps): React.ReactNode;
  renderTicks?(currentMessage: TMessage): React.ReactNode;
  renderUsername?(): React.ReactNode;
  renderUsernameOnMessage?: boolean
  position?: "left" | "right";
  currentMessage?: TMessage;
  nextMessage?: TMessage;
  previousMessage?: TMessage;
  containerStyle?: LeftRightStyle<ViewStyle>;
  wrapperStyle?: LeftRightStyle<ViewStyle>;
  textStyle?: LeftRightStyle<ViewStyle>;
  bottomContainerStyle: LeftRightStyle<ViewStyle>;
  tickStyle: TextStyle;
  containerToNextStyle: LeftRightStyle<ViewStyle>;
  containerToPreviousStyle: LeftRightStyle<ViewStyle>;
  // TODO: remove in next major release
  isSameDay?(currentMessage: TMessage, nextMessage: TMessage): boolean;
  isSameUser?(currentMessage: TMessage, nextMessage: TMessage): boolean;
}

export class Bubble extends React.Component<BubbleProps> {}

interface ComposerProps {
  composerHeight?: number;
  text?: string;
  placeholder?: string;
  placeholderTextColor?: string;
  textInputProps?: Partial<RN.TextInputProps>;
  onTextChanged?(text: string): void;
  onInputSizeChanged?(contentSize: { width: number; height: number }): void;
  multiline?: boolean;
{'fraction_non_alphanumeric': 0.1147276828875282, 'fraction_numerical': 0.0, 'mean_word_length': 5.582184517497349, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1811378', 'n_tokens_mistral': 1908, 'n_tokens_neox': 1920, 'n_words': 487}