import env from "../index";
const retirement = `${env.API_URI}/retirement`;
const retirementDischarge = `${retirement}/discharge`;
const retirementExpulsion = `${retirement}/expulsion`;
const retirementOut = `${retirement}/out`;
const report = `${retirement}/report`;

export default {
  profile: (type: string, year: string) =>
    `${retirement}/profile/${type}/${year}`,
  profileRetire: (retireProfileId: string) =>
    `${retirement}/profile/${retireProfileId}`,
  listRetire: (retireId: string) => `${retirement}/${retireId}`,
  createnote: () => `${retirement}/edit`,
  removeProfile: () => `${retirement}/remove`,
  reasonId: (retireId: string) => `${retirement}/reason/${retireId}`,
  retirement: (type: string, year: string) => `${retirement}/${type}/${year}`,
  createProfile: () => `${retirement}/profile`,

  //RetirementDeceased ถึงแก่กรรม
  listDeceased: () => `${retirement}/deceased`,
  detailDeceased: (id: string) => `${retirement}/deceased/${id}`,
  detailByidDeceased: (id: string) => `${retirement}/deceased/detail/${id}`,
  notiDeceased: (id: string) => `${retirement}/deceased/noti/${id}`,

  // RetirementResign ระบบลาออก
  listResign: () => `${retirement}/resign`,
  listResignEMP: () => `${retirement}/resign-employee`,
  resignReport: `${retirement}/resign/report`,
  resingByid: (id: string) => `${retirement}/resign/${id}`,
  resingByidEMP: (id: string) => `${retirement}/resign-employee/${id}`,
  resignConfirm: (role: String, id: string) =>
    `${retirement}/resign/${role}/confirm/${id}`,
  resignConfirmEMP: (role: String, id: string) =>
    `${retirement}/resign-employee/${role}/confirm/${id}`,
  resignReject: (role: String, id: string) =>
    `${retirement}/resign/${role}/reject/${id}`,
  resignRejectEMP: (role: String, id: string) =>
    `${retirement}/resign-employee/${role}/reject/${id}`,
  listExitInterview: () => `${retirement}/resign/questionnaire`,
  commentExitInterview: (id: string) =>
    `${retirement}/resign/questionnaire/comment/${id}`,
  questionExitInterview: () => `${retirement}/resign/questionnaire/question`,
  ExitInterviewByid: (id: string) => `${retirement}/resign/questionnaire/${id}`,
  ExitInterviewReport: `${retirement}/resign/questionnaire/report`,
  AppointInterview: (id: string) =>
    `${retirement}/resign/questionnaire/appoint/${id}`,
  resignConditions: (id: string) => `${retirement}/resign/debt/${id}`,
  resignConditionsEMP: (id: string) =>
    `${retirement}/resign-employee/debt/${id}`,

  // ปลดออก
  retirementDischarge,
  listDischarge: () => `${retirement}/discharge`,
  dischargeByid: (id: string) => `${retirement}/discharge/${id}`,
  dischargeReport: `${retirement}/discharge/report`,

  // ไล่ออก
  retirementExpulsion,
  listExpulsion: () => `${retirement}/expulsion`,
  expulsionByid: (id: string) => `${retirement}/expulsion/${id}`,
  expulsionReport: `${retirement}/expulsion/report`,

  // ให้ออก
  retirementOut,
  listOut: () => `${retirement}/out`,
  outByid: (id: string) => `${retirement}/out/${id}`,
  outReport: `${retirement}/out/report`,

  fileRetirement: (id: string) => `${retirement}/upload/${id}`,
  checkfileupload: (id: string) => `${retirement}/upload/check/${id}`,

  editDetail: (retireId: string) => `${retirement}/detail/${retireId}`,
  // ตำถาม Exit interview
  questionnaireList: () => `${retirement}/resign/questionnaire/question/admin`,

  //รายงาน
  retirementReport: `${report}`,

  addResign: (profileType: string, type: string, id: string) =>
    `${retirement}/resign${profileType}/officer/add-resign/${type}/${id}`,

  addResignCancel: (profileType: string, type: string, id: string) =>
    `${retirement}/resign${profileType}/officer-cancel/add-resign/${type}/${id}`,

  sendApproveRetirement: (type: string, id: string) =>
    `${retirement}/resign${type}/admin/approve/officer/${id}`,
  commanderApproveRetirement: (
    type: string,
    id: string,
    typeApprove: string,
    path: string = ""
  ) => `${retirement}/resign${type}/admin/${typeApprove}${path}/${id}`,

  // รายการยกเลิกการลาออก
  // สำหรับเจ้าหน้าที่
  officerCancelResign: (typeEmp: string, id: string) =>
    `${retirement}/resign${typeEmp}/admin-cancel/approve/officer/${id}`,

  // สำหรับผู้บังคับบัญชา
  comanderCancelResign: (typeEmp: string, action: string, id: string) =>
    `${retirement}/resign${typeEmp}/admin-cancel/${action}/comander/${id}`,

  // สำหรับผู้มีอำนาจ
  approverCancelResign: (typeEmp: string, action: string, id: string) =>
    `${retirement}/resign${typeEmp}/admin-cancel/${action}/${id}`,

  // แก้ไขข้อมูลการลาออก
  updateResign: (path: string, id: string) =>
    `${retirement}/${path}/admin-update/resign-info/${id}`,

  exRetirement: `${env.API_URI}/org/ex/retirement`,

  resignAdmin: (typeEmp: string) => `${retirement}/resign${typeEmp}/admin`,
};
