"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useBoundaries = void 0;
const consts_1 = require("../consts");
/**
 * Calculates boundaries for max/min dates allowed
 * Memoized so it will only recalculate when the boundaries changes
 */
const useBoundaries = ({ boundaries }) => {
    const min = new Date(consts_1.minDateTimestamp);
    const max = new Date(consts_1.maxDateTimestamp);
    const minDateTime = (boundaries === null || boundaries === void 0 ? void 0 : boundaries.startDate) || min;
    const maxDateTime = (boundaries === null || boundaries === void 0 ? void 0 : boundaries.endDate) || max;
    return { maxDateTime, minDateTime };
};
exports.useBoundaries = useBoundaries;
//# sourceMappingURL=useBoundaries.js.map