import type { FocusEventHandler, FormEventHandler, KeyboardEventHandler } from 'react'; export interface UseTextInputProps { initialValue?: string; handleCommit: (str: string) => void; uniqKey?: unknown; defaultValue?: string; controlledValue?: string; } export interface UseTextInputReturn { onHandleBlur: FocusEventHandler; onHandleChange: FormEventHandler; onHandleKeyDown: KeyboardEventHandler; value: string; } /** * Custom hook for Text input property getter and Synthetic event handlers. * * @param {String} initialValue Initial value of the text input. * @param {Function} handleCommit Function to execute that will commit the change to UDF definition. * @param {String} uniqKey A unique key to shallow compare that determines if we revert back to `initialValue` for the returned state `value`. * @returns {Object} useTextInput * @returns {Function} useTextInput.value.onHandleBlur React SyntheticEvent handler. * @returns {Function} useTextInput.value.onHandleChange React SyntheticEvent handler. * @returns {Function} useTextInput.value.onHandleKeyDown React SyntheticEvent handler. * @returns {String} useTextInput.value The value to be rendered in the controlled input. */ export declare const useTextInput: ({ initialValue, handleCommit, uniqKey, defaultValue, controlledValue, }: UseTextInputProps) => UseTextInputReturn; //# sourceMappingURL=useTextInput.d.ts.map