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


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

   

    return api.get(`/api/expense/list?pageSize=${pageSize}&pageNumber=${pageNumber}&filter=${payloadJsonString}`);
  },
  
  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/edit/${id}`),

  ActionOnExpense:(data)=>api.post('/api/expense/action',data),


}

export default ExpenseRepository;
