import { useState, useEffect } from 'react';
export default function useWeekRange(dateConfig, date, options) {
    var _a = useState(), rangeDate = _a[0], setRangeDate = _a[1];
    useEffect(function () {
        var _a = dateConfig || {}, startDate = _a.startDate, endDate = _a.endDate;
        var range = date
            ? [startDate === null || startDate === void 0 ? void 0 : startDate(date, options), endDate === null || endDate === void 0 ? void 0 : endDate(date, options)]
            : null;
        setRangeDate(range);
    }, [date, dateConfig, options]);
    return rangeDate;
}
