import a from "./index-moment.js";
const r = (t) => t ? a(t).format("DD-MMM-YY") : "", p = (t, e) => !t || !e ? !1 : r(t) === r(e), m = (t) => typeof t == "string" || typeof t == "number" ? a(t).toDate() : t, d = (t) => {
  const {
    startDate: e,
    endDate: n,
    label: D,
    isSelected: s,
    isDefault: u,
    replacements: i,
    id: l,
    adjustStartDate: c = !0
  } = t;
  return {
    id: l,
    label: D,
    hasCustomRendering: !0,
    startDate: e,
    endDate: n,
    isDefault: u,
    replacements: i,
    range: (o) => ({
      color: "var(--p400)",
      startDate: e && (c ? a(e).add(1, "day").toDate() : a(e).toDate()),
      endDate: n
    }),
    isSelected: s || ((o) => r(e) === r(o.startDate) && r(n) === r(o.endDate))
  };
};
export {
  p as areDatesEqual,
  d as createDatePickerRange,
  m as ensureIsRealDate,
  r as formatDateForComparison
};
