import { api } from "../utils/axiosClient";


const ExpenseRepository = {
  GetExpenseList: ( pageSize, pageNumber, filter,searchString ) => {
    const payloadJsonString = JSON.stringify(filter);

   

    return api.get(`/api/expense/list?pageSize=${pageSize}&pageNumber=${pageNumber}&filter=${payloadJsonString}&searchString=${searchString}`);
  },
  
  GetExpenseDetails:(id)=>api.get(`/api/Expense/details/${id}`),
  CreateExpense:(data)=>api.post("/api/Expense/create",data),
  UpdateExpense:(id,data)=>api.put(`/api/Expense/edit/${id}`,data),
  DeleteExpense:(id)=>api.delete(`/api/Expense/delete/${id}`),

  ActionOnExpense:(data)=>api.post('/api/expense/action',data),
  
  GetExpenseFilter:()=>api.get('/api/Expense/filter')

}

export default ExpenseRepository;
