import { endOfWeek as f, startOfWeek as s, endOfMonth as g, startOfMonth as i, addDays as u } from "date-fns";
const O = (e) => ({
  selected: e,
  range_start: e?.from,
  range_end: e?.to,
  range_middle: e
}), R = ({
  day: e,
  selectionVariant: t,
  rollingDays: r,
  locale: o,
  currentValue: m
}) => {
  const n = a(e, t, r, o);
  if (!c(m, n))
    return n;
}, a = (e, t, r, o) => t === "week" ? {
  from: s(e, { locale: o }),
  to: f(e, { locale: o })
} : t === "month" ? {
  from: i(e),
  to: g(e)
} : {
  from: e,
  to: u(e, r - 1)
}, c = (e, t) => e?.from?.getTime() === t?.from?.getTime() && e?.to?.getTime() === t?.to?.getTime();
export {
  O as createCustomRangeModifiers,
  R as getCustomRangeValue
};
//# sourceMappingURL=dayPickerRangeSelectionUtils.js.map
