import { endOfDay } from "date-fns/endOfDay";
import { startOfDay } from "date-fns/startOfDay";
import { startOfMonth } from "date-fns/startOfMonth";
import { startOfYear } from "date-fns/startOfYear";
import { subDays } from "date-fns/subDays";
import { subMonths } from "date-fns/subMonths";
import { subYears } from "date-fns/subYears";
function defaultDateRangePresets() {
  return [
    {
      id: "today",
      labelKey: "ui.dateRangePicker.presets.today",
      range: (ref = /* @__PURE__ */ new Date()) => ({ start: startOfDay(ref), end: endOfDay(ref) })
    },
    {
      id: "last_7_days",
      labelKey: "ui.dateRangePicker.presets.last7Days",
      range: (ref = /* @__PURE__ */ new Date()) => ({
        start: startOfDay(subDays(ref, 6)),
        end: endOfDay(ref)
      })
    },
    {
      id: "last_30_days",
      labelKey: "ui.dateRangePicker.presets.last30Days",
      range: (ref = /* @__PURE__ */ new Date()) => ({
        start: startOfDay(subDays(ref, 29)),
        end: endOfDay(ref)
      })
    },
    {
      id: "last_3_months",
      labelKey: "ui.dateRangePicker.presets.last3Months",
      range: (ref = /* @__PURE__ */ new Date()) => ({
        start: startOfDay(subMonths(ref, 3)),
        end: endOfDay(ref)
      })
    },
    {
      id: "last_12_months",
      labelKey: "ui.dateRangePicker.presets.last12Months",
      range: (ref = /* @__PURE__ */ new Date()) => ({
        start: startOfDay(subYears(ref, 1)),
        end: endOfDay(ref)
      })
    },
    {
      id: "month_to_date",
      labelKey: "ui.dateRangePicker.presets.monthToDate",
      range: (ref = /* @__PURE__ */ new Date()) => ({
        start: startOfMonth(ref),
        end: endOfDay(ref)
      })
    },
    {
      id: "year_to_date",
      labelKey: "ui.dateRangePicker.presets.yearToDate",
      range: (ref = /* @__PURE__ */ new Date()) => ({
        start: startOfYear(ref),
        end: endOfDay(ref)
      })
    },
    {
      id: "all_time",
      labelKey: "ui.dateRangePicker.presets.allTime",
      range: (ref = /* @__PURE__ */ new Date()) => ({
        // Symbolic "all time": from epoch to end of reference day.
        start: /* @__PURE__ */ new Date(0),
        end: endOfDay(ref)
      })
    }
  ];
}
export {
  defaultDateRangePresets
};
//# sourceMappingURL=date-picker-helpers.js.map
