/**
 * api ระบบจัดการข้อมูลหลัก
 *  เมนูย่อย: ปฏิทินวันหยุด
 */
import env from "../index";
const holiday = `${env.API_URI}/metadata/holiday/`;
const leaveHoliday = `${env.API_URI}/leave/metadata/holiday/`;

export default {
  /**
   * api ชั้นเครื่องราชฯ
   */
  listHolidayHistoryAdd: (category: string) =>
    `${leaveHoliday}range/add/${category}`,
  listHolidayHistoryEdit: (category: string) =>
    `${leaveHoliday}range/edit/${category}`,
  listHolidayHistoryDelete: (category: string) =>
    `${leaveHoliday}range/delete/${category}`,
  listHolidayHistoryYear: (year: number) => `${leaveHoliday}${year}`,
  listHolidayHistoryYearMonth: (year: number, month: number) =>
    `${leaveHoliday}${year}/${month}`,
  listHolidayCopy: `${leaveHoliday}copy`,
  summaryHolidayHistoryYear: (year: number) => `${leaveHoliday}summary/${year}`,
};
