import { useCallback, useState } from "react";
export function useSelectInput(initialValue = "") {
    const [value, setInternalValue] = useState(initialValue);
    const setValue = useCallback((next) => {
        setInternalValue(next);
    }, []);
    const reset = useCallback((next = "") => {
        setInternalValue(next);
    }, []);
    return {
        value,
        cursor: value.length,
        setValue,
        reset,
    };
}
