import env from "../index";

export const supportIssue = `${env.API_SUPPORT_URI}/issue`;
export const supportSearchIssue = (id: string) =>
  `${env.API_SUPPORT_URI}/issue?search=${id}`;
export const supportCategory = `${env.API_SUPPORT_URI}/Issue-category`;
export const supportCategoryAction = (id: string) =>
  `${env.API_SUPPORT_URI}/Issue-category/${id}`;
export const supportIssueChangeStatus = (id: string) =>
  `${env.API_SUPPORT_URI}/issue/${id}`;
export const supportMessage = (id: string) =>
  `${env.API_SUPPORT_URI}/issue/${id}/message`;

export const supportMessageStatus = (id: string) =>
  `${env.API_SUPPORT_URI}/issue/${id}/message-status`;

export const supportSocket = `${new URL(env.API_SUPPORT_URI).origin}`;

export default {
  supportIssue,
  supportCategory,
  supportSocket,
  supportMessage,
  supportMessageStatus,
  supportIssueChangeStatus,
  supportCategoryAction,
  supportSearchIssue,
};
