import React from "react";
import { useFormContext } from "react-hook-form";
export const useStateManager = (field) => {
    const form = useFormContext();
    const handleChange = React.useCallback((value) => {
        form.setValue(field.options.inputID, value);
    }, [form]);
    return React.useMemo(() => ({
        handleChange,
    }), [handleChange]);
};
//# sourceMappingURL=useStateManager.js.map