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

export async function getPlanningSentPagination(
  size: number,
  page: number,
  typeId: number,
  title: string = ""
) {
  return await httpGetInterceptor(
    `planning/pagination/sent?enablePage=1&size=${size}&page=${page}&typeId=${typeId}&title=${title}`
  );
}

export async function getPlanningById(id: any) {
  const url = `planning?id=${id}`;
  return httpGetInterceptor(url);
}

export async function publishPlanning(data: any) {
  const url = "planning/publish";
  return httpPostInterceptor(url, data);
}
