// (C) 2025 GoodData Corporation
import { useRef } from "react";
export function useEventHandlers({ onChange, onKeyDown, onCursor, onCompletion, onFocus, onBlur, }) {
    const handleKeyDown = useRef(onKeyDown);
    handleKeyDown.current = onKeyDown;
    const handleChange = useRef(onChange);
    handleChange.current = onChange;
    const handleCursor = useRef(onCursor);
    handleCursor.current = onCursor;
    const handleCompletion = useRef(onCompletion);
    handleCompletion.current = onCompletion;
    const handleFocus = useRef(onFocus);
    handleFocus.current = onFocus;
    const handleBlur = useRef(onBlur);
    handleBlur.current = onBlur;
    return {
        handleChange,
        handleCursor,
        handleKeyDown,
        handleCompletion,
        handleFocus,
        handleBlur,
    };
}
