import dayjs from "./day";

const range = [
  {
    label: "Today",
    value: [dayjs(), dayjs()]
  },
  {
    label: "Last 14 days",
    value: [dayjs().subtract(14, "day"), dayjs()]
  },
  {
    label: "Last 7 days",
    value: [dayjs().subtract(7, "day"), dayjs()]
  },
  {
    label: "Next 7 days",
    value: [dayjs(), dayjs().add(7, "day")]
  },
  {
    label: "Next 14 days",
    value: [dayjs(), dayjs().add(14, "day")]
  },
  {
    label: "Last Month",
    value: [dayjs().startOf("month").subtract(1, "month"), dayjs().startOf("month").subtract(1, "month").endOf("month")]
  },
  {
    label: "This Month",
    value: [dayjs().startOf("month"), dayjs().endOf("month")]
  },
  {
    label: "Next Month",
    value: [dayjs().startOf("month").add(1, "month"), dayjs().startOf("month").add(1, "month").endOf("month")]
  },
  {
    label: "Last Quarter",
    value: [dayjs().startOf("quarter").subtract(1, "quarter"), dayjs().startOf("quarter").subtract(1, "day")]
  },
  {
    label: "This Quarter",
    value: [dayjs().startOf("quarter"), dayjs().startOf("quarter").add(1, "quarter").subtract(1, "day")]
  },
  {
    label: "Last 90 Days",
    value: [dayjs().add(-90, "day"), dayjs()]
  }
];

if (import.meta.env.DEV) {
  range.push({
    label: "Last Year",
    value: [dayjs().subtract(1, "year"), dayjs()]
  });
}

export default range;
