import { getAPIInterceptor } from "@/config/api";
import {
  httpGetInterceptor,
  httpPostInterceptor,
} from "../http-config/http-interceptor-service";

export async function listTicketingInternal(page: number) {
  return await httpGetInterceptor(
    `ticketing/internal/pagination?enablePage=1&size=10&page=${page}`
  );
}

export async function getCuratorUser() {
  return await httpGetInterceptor("users/collaboration?enablePage=0");
}

export async function getTicketingPriority() {
  return await httpGetInterceptor("ticketing/priority");
}

export async function saveTicketingInternal(data: any) {
  const url = "ticketing/internal";
  return httpPostInterceptor(url, data);
}

export async function saveTicketing(data: any) {
  const url = "ticketing";
  return httpPostInterceptor(url, data);
}
