"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const dayjs = require("dayjs");
const shiftTimezone = require("./shift-timezone.cjs");
function getDefaultClampedDate({ minDate, maxDate, timezone }) {
  const today = shiftTimezone.shiftTimezone("add", /* @__PURE__ */ new Date(), timezone);
  if (!minDate && !maxDate) {
    return today;
  }
  if (minDate && dayjs(today).isBefore(minDate)) {
    return minDate;
  }
  if (maxDate && dayjs(today).isAfter(maxDate)) {
    return maxDate;
  }
  return today;
}
exports.getDefaultClampedDate = getDefaultClampedDate;
