import { useState, useEffect } from 'react';
export default function useHoverRange(selected, hoverDate) {
    var _a = useState(null), hoverRange = _a[0], setHoverRange = _a[1];
    useEffect(function () {
        var start = selected[0], end = selected[1];
        if (start && !end && hoverDate) {
            setHoverRange([start, hoverDate]);
        }
        else {
            setHoverRange(null);
        }
    }, [selected, hoverDate]);
    return hoverRange;
}
