import PropTypes from 'prop-types';
import React, { RefObject } from 'react';
import { Animated, StyleProp, ViewStyle, FlatList, TextStyle } from 'react-native';
import { ActionSheetOptions } from '@expo/react-native-action-sheet';
import * as utils from './utils';
import Actions from './Actions';
import Avatar from './Avatar';
import Bubble from './Bubble';
import SystemMessage from './SystemMessage';
import MessageImage from './MessageImage';
import MessageText from './MessageText';
import Composer from './Composer';
import Day from './Day';
import InputToolbar from './InputToolbar';
import LoadEarlier from './LoadEarlier';
import Message from './Message';
import MessageContainer from './MessageContainer';
import Send from './Send';
import Time from './Time';
import GiftedAvatar from './GiftedAvatar';
import { IMessage, User, Reply, LeftRightStyle, MessageVideoProps, MessageAudioProps } from './Models';
import QuickReplies from './QuickReplies';
export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
    messages?: TMessage[];
    isTyping?: boolean;
    messagesContainerStyle?: StyleProp<ViewStyle>;
    text?: string;
    alignTop?: boolean;
    wrapInSafeArea?: boolean;
    scrollToBottom?: boolean;
    scrollToBottomStyle?: StyleProp<ViewStyle>;
    initialText?: string;
    placeholder?: string;
    disableComposer?: boolean;
    user?: User;
    locale?: string;
    timeFormat?: string;
    dateFormat?: string;
    loadEarlier?: boolean;
    isLoadingEarlier?: boolean;
    showUserAvatar?: boolean;
    showAvatarForEveryMessage?: boolean;
    isKeyboardInternallyHandled?: boolean;
    renderAvatarOnTop?: boolean;
    inverted?: boolean;
    imageProps?: Message<TMessage>['props'];
    lightboxProps?: any;
    bottomOffset?: number;
    minInputToolbarHeight?: number;
    listViewProps?: any;
    textInputProps?: any;
    keyboardShouldPersistTaps?: any;
    maxInputLength?: number;
    forceGetKeyboardHeight?: boolean;
    alwaysShowSend?: boolean;
    imageStyle?: StyleProp<ViewStyle>;
    extraData?: any;
    minComposerHeight?: number;
    maxComposerHeight?: number;
    options?: {
        [key: string]: any;
    };
    optionTintColor?: string;
    quickReplyStyle?: StyleProp<ViewStyle>;
    isCustomViewBottom?: boolean;
    infiniteScroll?: boolean;
    timeTextStyle?: LeftRightStyle<TextStyle>;
    actionSheet?(): {
        showActionSheetWithOptions: (options: ActionSheetOptions, callback: (i: number) => void) => void;
    };
    onPressAvatar?(user: User): void;
    onLongPressAvatar?(user: User): void;
    messageIdGenerator?(message?: TMessage): string;
    onSend?(messages: TMessage[]): void;
    onLoadEarlier?(): void;
    renderLoading?(): React.ReactNode;
    renderLoadEarlier?(props: LoadEarlier['props']): React.ReactNode;
    renderAvatar?(props: Avatar<TMessage>['props']): React.ReactNode | null;
    renderBubble?(props: Bubble<TMessage>['props']): React.ReactNode;
    renderSystemMessage?(props: SystemMessage<TMessage>['props']): React.ReactNode;
    onLongPress?(context: any, message: any): void;
    renderMessage?(message: Message<TMessage>['props']): React.ReactNode;
    renderMessageText?(messageText: MessageText<TMessage>['props']): React.ReactNode;
    renderMessageImage?(props: MessageImage<TMessage>['props']): React.ReactNode;
    renderMessageVideo?(props: MessageVideoProps<TMessage>): React.ReactNode;
    renderMessageAudio?(props: MessageAudioProps<TMessage>): React.ReactNode;
    renderCustomView?(props: Bubble<TMessage>['props']): React.ReactNode;
    renderDay?(props: Day<TMessage>['props']): React.ReactNode;
    renderTime?(props: Time<TMessage>['props']): React.ReactNode;
    renderFooter?(): React.ReactNode;
    renderChatEmpty?(): React.ReactNode;
    renderChatFooter?(): React.ReactNode;
    renderInputToolbar?(props: InputToolbar['props']): React.ReactNode;
    renderComposer?(props: Composer['props']): React.ReactNode;
    renderActions?(props: Actions['props']): React.ReactNode;
    renderSend?(props: Send['props']): React.ReactNode;
    renderAccessory?(props: InputToolbar['props']): React.ReactNode;
    onPressActionButton?(): void;
    onInputTextChanged?(text: string): void;
    parsePatterns?(linkStyle: TextStyle): any;
    onQuickReply?(replies: Reply[]): void;
    renderQuickReplies?(quickReplies: QuickReplies['props']): React.ReactNode;
    renderQuickReplySend?(): React.ReactNode;
    scrollToBottomComponent?(): React.ReactNode;
    shouldUpdateMessage?(props: Message<TMessage>['props'], nextProps: Message<TMessage>['props']): boolean;
}
export interface GiftedChatState<TMessage extends IMessage = IMessage> {
    isInitialized: boolean;
    composerHeight?: number;
    messagesContainerHeight?: number | Animated.Value;
    typingDisabled: boolean;
    text?: string;
    messages?: TMessage[];
}
declare class GiftedChat<TMessage extends IMessage = IMessage> extends React.Component<GiftedChatProps<TMessage>, GiftedChatState> {
    static childContextTypes: {
        actionSheet: PropTypes.Requireable<(...args: any[]) => any>;
        getLocale: PropTypes.Requireable<(...args: any[]) => any>;
    };
    static defaultProps: {
        messages: any[];
        messagesContainerStyle: any;
        text: any;
        placeholder: string;
        disableComposer: boolean;
        messageIdGenerator: () => any;
        user: {};
        onSend: () => void;
        locale: any;
        timeFormat: string;
        dateFormat: string;
        loadEarlier: boolean;
        onLoadEarlier: () => void;
        isLoadingEarlier: boolean;
        renderLoading: any;
        renderLoadEarlier: any;
        renderAvatar: any;
        showUserAvatar: boolean;
        actionSheet: any;
        onPressAvatar: any;
        onLongPressAvatar: any;
        renderUsernameOnMessage: boolean;
        renderAvatarOnTop: boolean;
        renderBubble: any;
        renderSystemMessage: any;
        onLongPress: any;
        renderMessage: any;
        renderMessageText: any;
        renderMessageImage: any;
        renderMessageVideo: any;
        renderMessageAudio: any;
        imageProps: {};
        videoProps: {};
        audioProps: {};
        lightboxProps: {};
        textInputProps: {};
        listViewProps: {};
        renderCustomView: any;
        isCustomViewBottom: boolean;
        renderDay: any;
        renderTime: any;
        renderFooter: any;
        renderChatEmpty: any;
        renderChatFooter: any;
        renderInputToolbar: any;
        renderComposer: any;
        renderActions: any;
        renderSend: any;
        renderAccessory: any;
        isKeyboardInternallyHandled: boolean;
        onPressActionButton: any;
        bottomOffset: any;
        minInputToolbarHeight: number;
        keyboardShouldPersistTaps: string;
        onInputTextChanged: any;
        maxInputLength: any;
        forceGetKeyboardHeight: boolean;
        inverted: boolean;
        extraData: any;
        minComposerHeight: number;
        maxComposerHeight: number;
        wrapInSafeArea: boolean;
    };
    static propTypes: {
        messages: PropTypes.Requireable<object[]>;
        messagesContainerStyle: PropTypes.Requireable<number | boolean | object>;
        text: PropTypes.Requireable<string>;
        initialText: PropTypes.Requireable<string>;
        placeholder: PropTypes.Requireable<string>;
        disableComposer: PropTypes.Requireable<boolean>;
        messageIdGenerator: PropTypes.Requireable<(...args: any[]) => any>;
        user: PropTypes.Requireable<object>;
        onSend: PropTypes.Requireable<(...args: any[]) => any>;
        locale: PropTypes.Requireable<string>;
        timeFormat: PropTypes.Requireable<string>;
        dateFormat: PropTypes.Requireable<string>;
        isKeyboardInternallyHandled: PropTypes.Requireable<boolean>;
        loadEarlier: PropTypes.Requireable<boolean>;
        onLoadEarlier: PropTypes.Requireable<(...args: any[]) => any>;
        isLoadingEarlier: PropTypes.Requireable<boolean>;
        renderLoading: PropTypes.Requireable<(...args: any[]) => any>;
        renderLoadEarlier: PropTypes.Requireable<(...args: any[]) => any>;
        renderAvatar: PropTypes.Requireable<(...args: any[]) => any>;
        showUserAvatar: PropTypes.Requireable<boolean>;
        actionSheet: PropTypes.Requireable<(...args: any[]) => any>;
        onPressAvatar: PropTypes.Requireable<(...args: any[]) => any>;
        onLongPressAvatar: PropTypes.Requireable<(...args: any[]) => any>;
        renderUsernameOnMessage: PropTypes.Requireable<boolean>;
        renderAvatarOnTop: PropTypes.Requireable<boolean>;
        isCustomViewBottom: PropTypes.Requireable<boolean>;
        renderBubble: PropTypes.Requireable<(...args: any[]) => any>;
        renderSystemMessage: PropTypes.Requireable<(...args: any[]) => any>;
        onLongPress: PropTypes.Requireable<(...args: any[]) => any>;
        renderMessage: PropTypes.Requireable<(...args: any[]) => any>;
        renderMessageText: PropTypes.Requireable<(...args: any[]) => any>;
        renderMessageImage: PropTypes.Requireable<(...args: any[]) => any>;
        imageProps: PropTypes.Requireable<object>;
        videoProps: PropTypes.Requireable<object>;
        audioProps: PropTypes.Requireable<object>;
        lightboxProps: PropTypes.Requireable<object>;
        renderCustomView: PropTypes.Requireable<(...args: any[]) => any>;
        renderDay: PropTypes.Requireable<(...args: any[]) => any>;
        renderTime: PropTypes.Requireable<(...args: any[]) => any>;
        renderFooter: PropTypes.Requireable<(...args: any[]) => any>;
        renderChatEmpty: PropTypes.Requireable<(...args: any[]) => any>;
        renderChatFooter: PropTypes.Requireable<(...args: any[]) => any>;
        renderInputToolbar: PropTypes.Requireable<(...args: any[]) => any>;
        renderComposer: PropTypes.Requireable<(...args: any[]) => any>;
        renderActions: PropTypes.Requireable<(...args: any[]) => any>;
        renderSend: PropTypes.Requireable<(...args: any[]) => any>;
        renderAccessory: PropTypes.Requireable<(...args: any[]) => any>;
        onPressActionButton: PropTypes.Requireable<(...args: any[]) => any>;
        bottomOffset: PropTypes.Requireable<number>;
        minInputToolbarHeight: PropTypes.Requireable<number>;
        listViewProps: PropTypes.Requireable<object>;
        keyboardShouldPersistTaps: PropTypes.Requireable<string>;
        onInputTextChanged: PropTypes.Requireable<(...args: any[]) => any>;
        maxInputLength: PropTypes.Requireable<number>;
        forceGetKeyboardHeight: PropTypes.Requireable<boolean>;
        inverted: PropTypes.Requireable<boolean>;
        textInputProps: PropTypes.Requireable<object>;
        extraData: PropTypes.Requireable<object>;
        minComposerHeight: PropTypes.Requireable<number>;
        maxComposerHeight: PropTypes.Requireable<number>;
        alignTop: PropTypes.Requireable<boolean>;
        wrapInSafeArea: PropTypes.Requireable<boolean>;
    };
    static append<TMessage extends IMessage>(currentMessages: TMessage[], messages: TMessage[], inverted?: boolean): TMessage[];
    static prepend<TMessage extends IMessage>(currentMessages: TMessage[], messages: TMessage[], inverted?: boolean): TMessage[];
    _isMounted: boolean;
    _keyboardHeight: number;
    _bottomOffset: number;
    _maxHeight?: number;
    _isFirstLayout: boolean;
    _locale: string;
    invertibleScrollViewProps: any;
    _actionSheetRef: any;
    _messageContainerRef?: RefObject<FlatList<IMessage>>;
    _isTextInputWasFocused: boolean;
    textInput?: any;
    state: {
        isInitialized: boolean;
        composerHeight: number;
        messagesContainerHeight: any;
        typingDisabled: boolean;
        text: any;
        messages: any;
    };
    constructor(props: GiftedChatProps<TMessage>);
    getChildContext(): {
        actionSheet: () => any;
        getLocale: () => string;
    };
    componentDidMount(): void;
    componentWillUnmount(): void;
    componentDidUpdate(prevProps?: GiftedChatProps<TMessage>): void;
    initLocale(): void;
    setLocale(locale: string): void;
    getLocale: () => string;
    setTextFromProp(textProp?: string): void;
    getTextFromProp(fallback: string): string;
    setMessages(messages: TMessage[]): void;
    getMessages(): any;
    setMaxHeight(height: number): void;
    getMaxHeight(): number;
    setKeyboardHeight(height: number): void;
    getKeyboardHeight(): number;
    setBottomOffset(value: number): void;
    getBottomOffset(): number;
    setIsFirstLayout(value: boolean): void;
    getIsFirstLayout(): boolean;
    setIsTypingDisabled(value: boolean): void;
    getIsTypingDisabled(): boolean;
    setIsMounted(value: boolean): void;
    getIsMounted(): boolean;
    getMinInputToolbarHeight(): number;
    calculateInputToolbarHeight(composerHeight: number): number;
    /**
     * Returns the height, based on current window size, without taking the keyboard into account.
     */
    getBasicMessagesContainerHeight(composerHeight?: number): number;
    /**
     * Returns the height, based on current window size, taking the keyboard into account.
     */
    getMessagesContainerHeightWithKeyboard(composerHeight?: number): number;
    safeAreaSupport: (bottomOffset?: number) => number;
    /**
     * Store text input focus status when keyboard hide to retrieve
     * it after wards if needed.
     * `onKeyboardWillHide` may be called twice in sequence so we
     * make a guard condition (eg. showing image picker)
     */
    handleTextInputFocusWhenKeyboardHide(): void;
    /**
     * Refocus the text input only if it was focused before showing keyboard.
     * This is needed in some cases (eg. showing image picker).
     */
    handleTextInputFocusWhenKeyboardShow(): void;
    onKeyboardWillShow: (e: any) => void;
    onKeyboardWillHide: (_e: any) => void;
    onKeyboardDidShow: (e: any) => void;
    onKeyboardDidHide: (e: any) => void;
    scrollToBottom(animated?: boolean): void;
    renderMessages(): JSX.Element;
    onSend: (messages?: TMessage[], shouldResetInputToolbar?: boolean) => void;
    resetInputToolbar(): void;
    focusTextInput(): void;
    onInputSizeChanged: (size: {
        height: number;
    }) => void;
    onInputTextChanged: (text: string) => void;
    notifyInputTextReset(): void;
    onInitialLayoutViewLayout: (e: any) => void;
    onMainViewLayout: (e: any) => void;
    renderInputToolbar(): {};
    renderChatFooter(): {};
    renderLoading(): {};
    render(): JSX.Element;
}
export * from './Models';
export { GiftedChat, Actions, Avatar, Bubble, SystemMessage, MessageImage, MessageText, Composer, Day, InputToolbar, LoadEarlier, Message, MessageContainer, Send, Time, GiftedAvatar, utils, };
