import env from "../index";

const retirementResign = `${env.API_URI}/retirement`;
const leave = `${env.API_URI}/leave`;
const holiday = `${env.API_URI}/metadata/holiday/`;

export default {
  listUser: () => `${retirementResign}/resign/user`,
  listUserByType: (type: string) => `${retirementResign}/resign${type}/user`,
  listResign: () => `${retirementResign}/resign`,
  listResignByType: (type: string) => `${retirementResign}/resign${type}`,
  resingByid: (id: string) => `${retirementResign}/resign/${id}`,
  resingByidType: (type: string, id: string) =>
    `${retirementResign}/resign${type}/user/${id}`,
  questionnaireByid: (id: string) =>
    `${retirementResign}/resign/questionnaire/${id}`,
  listquestionnaire: () => `${retirementResign}/resign/questionnaire`,
  cancelResign: (id: string) => `${retirementResign}/resign/cancel/${id}`,
  cancelResignByType: (type: string, id: string) =>
    `${retirementResign}/resign${type}/cancel/${id}`,

  // คำถาม
  questionList: () => `${retirementResign}/resign/questionnaire/question`,

  /**รายการลา */
  leaveType: () => `${leave}/type`,
  leaveCalendar: () => `${leave}/user/calendar`,
  leaveTableList: () => `${leave}/user/table`,
  leaveCancelById: (id: string) => `${leave}/user/delete/${id}`,
  leaveStats: () => `${leave}/user/summary`,
  leaveUser: () => `${leave}/user`,
  leaveUserId: (id: string) => `${leave}/user/${id}`,
  leaveUserSendId: (id: string) => `${leave}/user/send/${id}`,
  leaveProfile: () => `${leave}/user/profile`,
  leaveCheck: () => `${leave}/user/check`,
  leaveReport: (id: string) => `${leave}/report/${id}`,
  leaveSendReport: () => `${leave}/report-template/docx`,
  leaveDocumentId: (id: string, docId: string) =>
    `${leave}/user/file/document/${id}/${docId}`,

  listHolidayHistoryYearMonth: (year: number, month: number) =>
    `${holiday}${year}/${month}`,
};
