import { Ref } from 'vue';
export type UseInputEmitsT = {
    (e: 'change', value: string, lastValue: string): void;
    (e: 'input', evt: Event, value: string): void;
    (e: 'focus', evt: FocusEvent): void;
    (e: 'blur', evt: FocusEvent): void;
    (e: 'clear', evt?: Event): void;
    (e: 'pressEnter', evt: KeyboardEvent): void;
};
export interface InputOptionT {
    modelValue?: Ref<string | undefined>;
    defaultValue?: string;
    emits: UseInputEmitsT;
    emitUpdate: (value: string) => void;
    validate?: (value: string) => boolean;
    valueOnInvalidChange?: (inputValue: string, lastValidInputValue: string) => string;
    format?: (value: string) => string;
    maxLength?: Ref<number | undefined>;
    minLength?: Ref<number | undefined>;
    calculateLength?: (value: string) => number;
    inputOnOutlimit?: Ref<boolean | undefined>;
}
/**
 * 输入框
 */
export declare function useInput(options: InputOptionT): {
    realValue: import('vue').ComputedRef<string>;
    displayValue: import('vue').ComputedRef<string>;
    isValid: Ref<boolean, boolean>;
    inputEl: Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
    clearValue: () => void;
    inputValueLength: import('vue').ComputedRef<number>;
    isOutLengthLimit: import('vue').ComputedRef<boolean>;
    handleInput: (e: Event) => void;
    handleFocus: (e: FocusEvent) => void;
    handleBlur: (e: FocusEvent) => void;
    handlePressEnter: (e: KeyboardEvent) => void;
    handleClear: (e: Event) => void;
};
