import * as React from 'react';
import { HistoryNavigator } from '../common';
import { InputProps } from '../inputs/Input';
import { TextAreaProps } from '../inputs/TextArea';
type HTMLTextElement = HTMLInputElement | HTMLTextAreaElement;
type TextElementProps = InputProps | TextAreaProps;
export type EventType = 'KeyDown' | 'Paste' | 'Cut' | 'Undo' | 'Redo' | 'Backspace' | 'Delete' | 'Initial';
interface WithDisplayFormatState {
    value: string;
    historyNavigator: HistoryNavigator;
    prevDisplayPattern: string;
    triggerType: EventType;
    triggerEvent: React.KeyboardEvent<HTMLTextElement> | null;
    pastedLength: number;
    selectionStart: number;
    selectionEnd: number;
}
export interface WithDisplayFormatProps<T extends TextElementProps = TextElementProps> extends Pick<TextElementProps, 'className' | 'disabled' | 'id' | 'maxLength' | 'minLength' | 'name' | 'placeholder' | 'readOnly' | 'required' | 'inputMode'> {
    value?: string;
    displayPattern: string;
    /**
     * autocomplete hides our form help so we need to disable it when help text
     * is present. Chrome ignores autocomplete=off, the only way to disable it is
     * to provide an 'invalid' value, for which 'disabled' serves.
     */
    autoComplete?: TextElementProps['autoComplete'] | 'disabled';
    onChange?: (value: string) => void;
    onBlur?: (value: string) => void;
    onFocus?: (value: string) => void;
    render: (renderProps: T) => React.JSX.Element;
}
declare class WithDisplayFormat<T extends TextElementProps> extends React.Component<WithDisplayFormatProps<T>, WithDisplayFormatState> {
    props: WithDisplayFormatProps<T> & Required<Pick<WithDisplayFormatProps<T>, keyof typeof WithDisplayFormat.defaultProps>>;
    static defaultProps: {
        autoComplete: string;
        displayPattern: string;
        value: string;
    };
    constructor(props: WithDisplayFormatProps);
    static getDerivedStateFromProps({ displayPattern }: WithDisplayFormatProps, { prevDisplayPattern, value, historyNavigator }: WithDisplayFormatState): {
        prevDisplayPattern: string;
        value: string;
        triggerType: null;
        triggerEvent: null;
        pastedLength: number;
    } | null;
    getUserAction: (unformattedValue: string) => EventType | string;
    resetEvent: () => void;
    detectUndoRedo: (event: React.KeyboardEvent<HTMLTextElement>) => "Undo" | "Redo" | null;
    handleOnKeyDown: React.KeyboardEventHandler<HTMLTextElement>;
    handleOnPaste: React.ClipboardEventHandler<HTMLTextElement>;
    handleOnCut: React.ClipboardEventHandler<HTMLTextElement>;
    isKeyAllowed: (action: EventType | string) => boolean;
    handleOnChange: React.ChangeEventHandler<HTMLTextElement>;
    handleOnBlur: React.FocusEventHandler<HTMLTextElement>;
    handleOnFocus: React.FocusEventHandler<HTMLTextElement>;
    handleDelete: (unformattedValue: string, action: EventType) => string;
    handleCursorPositioning: (action: string) => void;
    render(): React.JSX.Element;
}
export default WithDisplayFormat;
//# sourceMappingURL=WithDisplayFormat.d.ts.map