import { maxDateTimestamp, minDateTimestamp } from '../consts';
/**
 * Calculates boundaries for max/min dates allowed
 * Memoized so it will only recalculate when the boundaries changes
 */
export const useBoundaries = ({ boundaries }) => {
    const min = new Date(minDateTimestamp);
    const max = new Date(maxDateTimestamp);
    const minDateTime = boundaries?.startDate || min;
    const maxDateTime = boundaries?.endDate || max;
    return { maxDateTime, minDateTime };
};
//# sourceMappingURL=useBoundaries.js.map