import env from "../index";

const support = `${env.API_URL_SUPPORT}`;

export default {
  supportMessageStatus: (id: string) => `${support}/issue/${id}/message-status`,

  supportMessage: (id: string, pageSize: number = 999, page: number = 1) =>
    `${support}/issue/${id}/message?pageSize=${pageSize}&page=${page}`,

  supportIssueUserId: (userId: string) => `${support}/issue?userId=${userId}`,

  supportIssue: (pageSize: number = 999, page: number = 1) =>
    `${support}/issue?pageSize=${pageSize}&page=${page}`,

  supportSearchIssue: (
    search: string,
    pageSize: number = 999,
    page: number = 1
  ) => `${support}/issue?pageSize=${pageSize}&page=${page}&search=${search}`,

  supportIssueCategory: `${support}/issue-category`,
  supportNewIssue: `${support}/issue`,
  supportSocket: `${new URL(support).origin}`,
};
