import dayjs from 'dayjs';
import { getText } from "../../locales";
export var presetDetailMap = {
  today: {
    getValue: function getValue() {
      return dayjs().startOf('day');
    },
    label: function label() {
      return getText('date-picker-today');
    }
  },
  yesterday: {
    getValue: function getValue() {
      return dayjs().add(-1, 'd').startOf('day');
    },
    label: function label() {
      return getText('date-picker-yesterday');
    }
  },
  tomorrow: {
    getValue: function getValue() {
      return dayjs().add(1, 'd').startOf('day');
    },
    label: function label() {
      return getText('date-picker-tomorrow');
    }
  },
  next_monday: {
    getValue: function getValue() {
      return dayjs().startOf('week').add(8, 'day').startOf('day');
    },
    label: function label() {
      return getText('date-picker-next_monday');
    }
  },
  last_friday: {
    getValue: function getValue() {
      return dayjs().subtract(1, 'week').startOf('week').add(5, 'day').startOf('day');
    },
    label: function label() {
      return getText('date-picker-last_friday');
    }
  },
  first_day_of_this_month: {
    getValue: function getValue() {
      return dayjs().startOf('month').startOf('day');
    },
    label: function label() {
      return getText('date-picker-first_day_of_this_month');
    }
  },
  last_day_of_this_month: {
    getValue: function getValue() {
      return dayjs().endOf('month').startOf('day');
    },
    label: function label() {
      return getText('date-picker-last_day_of_this_month');
    }
  },
  first_day_of_next_month: {
    getValue: function getValue() {
      return dayjs().endOf('month').add(1, 'day').startOf('day');
    },
    label: function label() {
      return getText('date-picker-first_day_of_next_month');
    }
  },
  last_day_of_last_month: {
    getValue: function getValue() {
      return dayjs().startOf('month').subtract(1, 'day').startOf('day');
    },
    label: function label() {
      return getText('date-picker-last_day_of_last_month');
    }
  }
};