import { BaseApiService } from '@/services/api/base';
import { httpClient, httpClientFetcher } from '@/services/http/client';
import { BaseApiResponse } from '@/types/api/api-general';
import { ReportExpense } from '@/types/api/report/report-expense';
import axios from 'axios';

export class ReportExpenseApiService extends BaseApiService<
  ReportExpense,
  unknown,
  unknown
> {
  constructor(basePath: string) {
    super(basePath);
  }

  async getAllFetcher(
    endpoint: string
  ): Promise<BaseApiResponse<ReportExpense[]>> {
    return await httpClientFetcher<BaseApiResponse<ReportExpense[]>>(endpoint);
  }
}

export const ReportExpenseApi = new ReportExpenseApiService('/reports/expense');
