import { httpGetInterceptor, httpGetWithBlobInterceptor, httpPostInterceptor, } from "../http-config/http-interceptor-service"; export async function paginationReport( size: any, page: number, title: string = "", categoryFilter: any, statusFilter: any ) { return await httpGetInterceptor( `/media/report/list?enablePage=1&page=${page}&size=${size}&title=${title}&categoryId=${categoryFilter}&statusId=${statusFilter}` ); } export async function getPreviewById(id: any) { return await httpGetInterceptor(`/media/report/view?id=${id}`); } export async function saveReport(data: any) { const url = "/media/report"; return httpPostInterceptor(url, data); } export async function getUserReports(id: any) { const url = `users/reports?id=${id}`; return httpGetInterceptor(url); } export async function saveUserReportsAction(id: any, action: any) { const url = `users/reports/action?id=${id}&action=${action}`; return httpPostInterceptor(url); }; export async function downloadReport(id: any) { const url = `/media/report/download?id=${id}`; return httpGetWithBlobInterceptor(url); }