import { Ref, ComputedRef } from 'vue'; export type UseTextInputStateProps = { /** * Default input value. */ defaultValue?: string; /** * Suggestions to autocomplete the input value. */ suggestions?: string[]; /** * Callback when input value changes. */ onChange?: (value: string) => void; /** * Callback when enter is pressed. First argument is input value. */ onSubmit?: (value: string) => void; }; export type TextInputState = { /** * Previous value. */ previousValue: Ref; /** * Current input value. */ value: Ref; /** * Current cursor position. */ cursorOffset: Ref; /** * Suggested auto completion. */ suggestion: ComputedRef; /** * Move cursor to the left. */ moveCursorLeft: () => void; /** * Move cursor to the right. */ moveCursorRight: () => void; /** * Insert text. */ insert: (text: string) => void; /** * Delete character. */ delete: () => void; /** * Submit input value. */ submit: () => void; }; export declare const useTextInputState: ({ defaultValue, suggestions, onChange, onSubmit, }?: UseTextInputStateProps) => TextInputState; //# sourceMappingURL=use-text-input-state.d.ts.map