/**
 * api ระบบจัดการข้อมูลหลัก
 *  เมนูย่อย: ข้อมูลเครื่องราชอิสริยาภรณ์
 */
import env from "../index";
const insignia = `${env.API_URI}/metadata/insignia/`;
const insigniaType = `${env.API_URI}/metadata/insignia-type/`;
const insigniaOrg = `${env.API_URI}/org/insignia/insignia/`;
const insigniaTypeOrg = `${env.API_URI}/org/insignia/insignia-type/`;

export default {
  /**
   * api ชั้นเครื่องราชฯ
   */
  insignia,
  listInsigniaHistory: `${insignia}history`,
  listInsigniaHistoryId: (id: string) => `${insignia}history/${id}`,
  listInsigniaPublished: `${insignia}history/published`,
  listInsigniaPublishedHistory: `${insignia}history/published-history`,

  /**
   * api ประเภท
   */
  insigniaType,
  listInsigniaTypeHistory: `${insigniaType}history`,
  listInsigniaTypeHistoryId: (id: string) => `${insigniaType}history/${id}`,
  listInsigniaTypePublished: `${insigniaType}history/published`,
  listInsigniaTypePublishedHistory: `${insigniaType}history/published-history`,

  /**
   * api เหรียญตรา
   */
  //   listInsigniaHistory: `${insignia}history`,
  //   listInsigniaHistoryId: (id: string) => `${insignia}history/${id}`,
  //   listInsigniaPublished: `${insignia}history/published`,
  //   listInsigniaPublishedHistory: `${insignia}history/published-history`,
  insigniaTypeNew: `${insigniaType}draft`,
  insigniaTypeNewId: (id: string) => `${insigniaType}${id}`,
  insigniaNewId: (id: string) => `${insignia}${id}`,
  insigniaSort: (id: string) => `${insignia}sort/${id}`,

  insigniaOrg,
  insigniaTypeOrg,
  insigniaTypeNewOrg: `${insigniaOrg}`,
  insigniaTypeNewIdOrg: (id: string) => `${insigniaTypeOrg}${id}`,
  insigniaNewIdOrg: (id: string) => `${insigniaOrg}${id}`,
  insigniaSortOrg: (id: string) => `${insigniaOrg}sort/${id}`,
};
