import env from "../index";

const registryNew = `${env.API_URI}/org/profile`;
const org = `${env.API_URI}/org`;
const metadata = `${env.API_URI}/org/metadata/`;

export default {
  registryNew: (type: string) => `${registryNew}${type}`,
  registryNewLeave: (type: string) => `${registryNew}${type}/profileLeave`,
  registryNewOtherSystem: (type: string) => `${registryNew}${type}/otherSystem`,
  registryNewByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/${profileId}`,

  // metadata
  profileNewMetaMain: `${metadata}main/person`,
  profileNewProvince: `${metadata}province`,
  profileNewDistrictByPId: (id: string) => `${metadata}province/${id}`,
  profileNewSubDistrictByDId: (id: string) => `${metadata}district/${id}`,

  // ประวัติส่วนตัว
  profileNewProfileById: (dataId: string, type: string) =>
    `${registryNew}${type}/${dataId}`,
  profileNewProfileHisById: (dataId: string, type: string) =>
    `${registryNew}${type}/history/${dataId}`,

  // ข้อมูลที่อยู่
  profileNewAddressByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/address/${profileId}`,
  profileNewAddressById: (dataId: string, type: string) =>
    `${registryNew}${type}/address/${dataId}`,
  profileNewAddressHisById: (dataId: string, type: string) =>
    `${registryNew}${type}/address/history/${dataId}`,

  // บันทึกวันที่ไม่ได้รับเงินเดือนฯ
  profileNewNoPaid: (type: string) => `${registryNew}${type}/nopaid`,
  profileNewNoPaidByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/nopaid/${profileId}`,
  profileNewNoPaidById: (dataId: string, type: string) =>
    `${registryNew}${type}/nopaid/${dataId}`,
  profileNewNoPaidHisById: (dataId: string, type: string) =>
    `${registryNew}${type}/nopaid/history/${dataId}`,
  profileNewNoPaidUpdateDelete: (type: string) =>
    `${registryNew}${type}/nopaid/update-delete/`,

  // เครื่องราชฯ
  profileNewInsign: (type: string) => `${registryNew}${type}/insignia`,
  profileNewInsignByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/insignia/${profileId}`,
  profileNewInsignUpdateDelete: (type: string) =>
    `${registryNew}${type}/insignia/update-delete/`,

  orgInsigniaActive: () => `${org}/insignia/insignia-type/active`,

  profileNewInsignById: (dataId: string, type: string) =>
    `${registryNew}${type}/insignia/${dataId}`,
  profileNewInsignHisById: (dataId: string, type: string) =>
    `${registryNew}${type}/insignia/admin/history/${dataId}`,

  // ประกาศเกียรติคุณ
  profileNewHonor: (type: string) => `${registryNew}${type}/honor`,
  profileNewHonorByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/honor/${profileId}`,
  profileNewHonorById: (dataId: string, type: string) =>
    `${registryNew}${type}/honor/${dataId}`,
  profileNewHonorHisById: (dataId: string, type: string) =>
    `${registryNew}${type}/honor/admin/history/${dataId}`,
  profileNewHonorUpdateDelete: (type: string) =>
    `${registryNew}${type}/honor/update-delete/`,

  // ผลการประเมินการปฏิบัติราชการ
  profileNewAssessments: (type: string) => `${registryNew}${type}/assessments`,
  profileNewAssessmentsByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/assessments/${profileId}`,
  profileNewAssessmentsById: (dataId: string, type: string) =>
    `${registryNew}${type}/assessments/${dataId}`,
  profileNewAssessmentsHisById: (dataId: string, type: string) =>
    `${registryNew}${type}/assessments/admin/history/${dataId}`,
  profileDevelopmentUpdateDelete: (type: string) =>
    `${registryNew}${type}/development/update-delete/`,
  profileNewAssessmentsUpdateDelete: (type: string) =>
    `${registryNew}${type}/assessments/update-delete/`,
  // การฝึกอบรม
  profileNewTraining: (type: string) => `${registryNew}${type}/training`,
  profileNewTrainingByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/training/${profileId}`,
  profileNewTrainingByTrainingId: (trainingId: string, type: string) =>
    `${registryNew}${type}/training/${trainingId}`,
  profileNewTrainingHisByTrainingId: (trainingId: string, type: string) =>
    `${registryNew}${type}/training/admin/history/${trainingId}`,
  profileTrainingUpdate: (type: string) =>
    `${registryNew}${type}/training/update-delete/`,

  // ประวัติการศึกษา
  profileNewEducation: (type: string) => `${registryNew}${type}/educations`,
  profileNewEducationSort: (type: string) =>
    `${registryNew}${type}/educations/sort`,

  profileNewEducationByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/educations/${profileId}`,
  profileNewEducationByEducationId: (educationId: string, type: string) =>
    `${registryNew}${type}/educations/${educationId}`,
  profileNewEducationHisByEducationId: (educationsId: string, type: string) =>
    `${registryNew}${type}/educations/admin/history/${educationsId}`,
  profileEducationUpdateDelete: (type: string) =>
    `${registryNew}${type}/educations/update-delete/`,

  // ความสามารถพิเศษ
  profileNewAbility: (type: string) => `${registryNew}${type}/ability`,
  profileNewAbilityByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/ability/${profileId}`,
  profileNewAbilityByAbilityId: (abilityId: string, type: string) =>
    `${registryNew}${type}/ability/${abilityId}`,
  profileNewAbilityHisByAbilityId: (abilityId: string, type: string) =>
    `${registryNew}${type}/ability/admin/history/${abilityId}`,
  profileAbilityUpdateDelete: (type: string) =>
    `${registryNew}${type}/ability/update-delete/`,

  // ใบอนุญาตประกอบวิชาชีพ
  profileNewCertificate: (type: string) => `${registryNew}${type}/certificate`,
  profileNewCertificateByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/certificate/${profileId}`,
  profileNewCertificateByCertificateId: (certificateId: string, type: string) =>
    `${registryNew}${type}/certificate/${certificateId}`,
  profileNewCertificateHisByCertificateId: (
    certificateId: string,
    type: string
  ) => `${registryNew}${type}/certificate/admin/history/${certificateId}`,
  profileCertificateUpdateDelete: (type: string) =>
    `${registryNew}${type}/certificate/update-delete/`,

  // ข้อมูลอื่นๆ
  profileNewOther: (type: string) => `${registryNew}${type}/other`,
  profileNewOtherByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/other/${profileId}`,
  profileNewOtherById: (dataId: string, type: string) =>
    `${registryNew}${type}/other/${dataId}`,
  profileNewOtherHisById: (dataId: string, type: string) =>
    `${registryNew}${type}/other/admin/history/${dataId}`,
  profileOtherUpdateDelete: (type: string) =>
    `${registryNew}${type}/other/update-delete/`,

  // ข้อมูลครอบครัว
  profileNewFamily: (type: string) => `${registryNew}${type}/family`,
  profileNewFamilyByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/family/${profileId}`,
  profileNewFamilyByFamilyId: (familyId: string, type: string) =>
    `${registryNew}${type}/family/${familyId}`,
  profileNewFamilyHisByFamilyId: (familyId: string, type: string) =>
    `${registryNew}${type}/family/history/${familyId}`,

  // วินัย
  profileNewDiscipline: (type: string) => `${registryNew}${type}/discipline`,
  profileNewDisciplineByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/discipline/${profileId}`,
  profileNewDisciplineByDisciplineId: (disciplineId: string, type: string) =>
    `${registryNew}${type}/discipline/${disciplineId}`,
  profileNewDisciplineHisByDisciplineId: (disciplineId: string, type: string) =>
    `${registryNew}${type}/discipline/admin/history/${disciplineId}`,
  disciplineListCard: (profileId: string, type: string) =>
    `${registryNew}${type}/discipline/admin/${profileId}`, // noPermission
  profileNewDisciplineUpdateDelete: (type: string) =>
    `${registryNew}${type}/discipline/update-delete/`,

  // ปฏิบัติราชการพิเศษ
  profileNewDuty: (type: string) => `${registryNew}${type}/duty`,
  profileNewDutyByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/duty/${profileId}`,
  profileNewDutyByDutyId: (dutyId: string, type: string) =>
    `${registryNew}${type}/duty/${dutyId}`,
  profileNewDutyHisByDutyId: (dutyId: string, type: string) =>
    `${registryNew}${type}/duty/admin/history/${dutyId}`,
  profileDutyUpdateDelete: (type: string) =>
    `${registryNew}${type}/duty/update-delete/`,

  //ข้อมูลราชการ
  profileNewGovernment: (type: string) => `${registryNew}${type}/government`,
  profileNewGovernmentById: (id: string, type: string) =>
    `${registryNew}${type}/government/${id}`,
  profileNewGovernmentHistory: (id: string, type: string) =>
    `${registryNew}${type}/government/history/${id}`,
  profileNewGovernmentCard: (id: string, type: string) =>
    `${registryNew}${type}/government/admin/${id}`, // noPermission

  //การลา
  profileNewLeave: (type: string) => `${registryNew}${type}/leave`,
  profileNewLeaveById: (id: string, type: string) =>
    `${registryNew}${type}/leave/${id}`,
  profileNewLeaveHistory: (id: string, type: string) =>
    `${registryNew}${type}/leave/admin/history/${id}`,
  profileCheckDate: () => `${env.API_URI}/leave/user/check`,
  profileNewLeaveType: () => `${env.API_URI}/leave/type`,
  leaveListCard: (id: string, type: string) =>
    `${registryNew}${type}/leave/admin/${id}`, //noPermission
  profileNewLeaveUpdateDelete: (type: string) =>
    `${registryNew}${type}/leave/update-delete/`,

  /** ตำแหน่ง*/
  profileSalaryPositionNew: (type: string) =>
    `${registryNew}${type}/salary/position`,
  profileListSalaryPositionNew: (id: string, type: string) =>
    `${registryNew}${type}/salary/position/${id}`,
  profileListSalaryPositionHistoryNew: (profileId: string, type: string) =>
    `${registryNew}${type}/salary/position/admin/history/${profileId}`,
  profileSalaryPositionSwapNew: (type: string, id: string, type2: string) =>
    `${registryNew}${type2}/salary/position/swap/${type}/${id}`,
  salaryListCardPosition: (id: string, type: string) =>
    `${registryNew}${type}/salary/position/admin/${id}`, //noPermission
  salaryTenurePosition: (id: string, type: string) =>
    `${registryNew}${type}/salary/tenure/${id}`, //noPermission

  /** ตำแหน่งเงินเดือน*/
  profileSalaryNew: (type: string) => `${registryNew}${type}/salary`,
  profileListSalaryNew: (id: string, type: string) =>
    `${registryNew}${type}/salary/${id}`,
  profileListSalaryHistoryNew: (profileId: string, type: string) =>
    `${registryNew}${type}/salary/admin/history/${profileId}`,
  profileSalarySwapNew: (type: string, id: string, type2: string) =>
    `${registryNew}${type2}/salary/swap/${type}/${id}`,
  salaryListCard: (id: string, type: string) =>
    `${registryNew}${type}/salary/admin/${id}`, //noPermission

  // ประวัติการเปลี่ยนชื่อ-นามสกุล
  profileNewChangeName: (type: string) => `${registryNew}${type}/changeName`,
  profileNewChangeNameByProfileId: (profileId: string, type: string) =>
    `${registryNew}${type}/changeName/${profileId}`,
  profileNewChangeNameByChangeNameId: (changeNameId: string, type: string) =>
    `${registryNew}${type}/changeName/${changeNameId}`,
  profileNewChangeNameHisByChangeNameId: (changeNameId: string, type: string) =>
    `${registryNew}${type}/changeName/history/${changeNameId}`,
  profileNewChangeNameUpdateDelete: (type: string) =>
    `${registryNew}${type}/changeName/update-delete/`,

  //ข้อมูลครอบครับ
  profileFamily: (empType: string, type: string) =>
    `${registryNew}${empType}/family/${type}`,
  profileFamilyHistory: (id: string, empType: string, type: string) =>
    `${registryNew}${empType}/family/${type}/history/${id}`,
  profileFamilyUpdateDelete: (empType: string, type: string) =>
    `${registryNew}${empType}/family/${type}/update-delete/`,

  //ลูกจ้างชั่วคราว
  positionEmployee: (id: string) => `${registryNew}-employee/position/${id}`,
  informationEmployee: (id: string) =>
    `${registryNew}-employee/information/${id}`,
  informationHistoryEmployee: (id: string) =>
    `${registryNew}-employee/information/history/${id}`,
  employmentEmployee: (id: string) =>
    `${registryNew}-employee/employment/${id}`,
  employmentEmployeeId: (id: string) =>
    `${registryNew}-employee/employment/id/${id}`,
  employmentHistoryEmployee: (id: string) =>
    `${registryNew}-employee/employment/history/${id}`,

  developMentPlan: (type: string) => `${registryNew}${type}/development`,

  requestInformationbyType: (type: string, id: string) =>
    `${registryNew}/request-edit/${type}/${id}`,

  // รักษาการในตำแหน่ง
  profileActposition: (type: string, id: string) =>
    `${registryNew}${type}/actposition/${id}`,
  profileActpositionHistory: (id: string, type: string) =>
    `${registryNew}${type}/actposition/history/${id}`,
  profileActpositionUpdateDelete: (type: string) =>
    `${registryNew}${type}/actposition/update-delete/`,

  //ช่วยราชการ
  profileAssistance: (type: string, id: string) =>
    `${registryNew}${type}/assistance/${id}`,
  profileAssistanceHistory: (id: string, type: string) =>
    `${registryNew}${type}/assistance/history/${id}`,
  profileAssistanceReturn: `${env.API_URI}/placement/repatriation`,
  profileAssistanceUpdateDelete: (type: string) =>
    `${registryNew}${type}/assistance/update-delete/`,

   profileAbsentLate: (type: string) => `${registryNew}${type}/absent-late`,
   profileAbsentLateUpdateDelete: (type: string) => `${registryNew}${type}/absent-late/update-delete`,
   profileAbsentLateHistory: (id: string, type: string) =>
     `${registryNew}${type}/absent-late/history/${id}`,

};
