import {ReactNode} from 'react';
import {StyleProp, TextInputProps, ViewStyle} from 'react-native';
import {TaggedUser} from '@interfaces/taggedUsers';

interface CommonInputProps {
  autoCapitalize?: boolean;
  borderBottomWidth?: number;
  taggedUsers?: TaggedUser[];
  borderBottomColor?: string;
  noBorder?: boolean;
}

export interface CustomizedTextInputProps
  extends Omit<TextInputProps, 'autoCapitalize'>,
    CommonInputProps {
  showMaxLength?: boolean;
  inputColor?: string;
  onDebounceTyping?: () => void;
  onDebounceStopTyping?: () => void;
  button?: ReactNode;
  customBorderButtonColor?: string;
  containerStyle?: StyleProp<ViewStyle>;
  lengthTextStyle?: StyleProp<ViewStyle>;
}

export interface CustomizedTextInputRefProps {
  focus: () => void;
  blur: () => void;
  clear: () => void;
}

export interface TextInputComponentProps
  extends Omit<TextInputProps, 'autoCapitalize'>,
    CommonInputProps {}
