import { apiGet } from '@/lib/http'
import type { AdminFinanceSummary, AdminFinanceTransactionResult } from '@/types/admin/finance'

export function fetchAdminFinanceSummary(params: { dateFrom?: string; dateTo?: string } = {}) {
  return apiGet<AdminFinanceSummary>('/api/v1/admin/finance/summary', params)
}

export function fetchAdminFinanceTransactions(
  params: {
    dateFrom?: string
    dateTo?: string
    category?: string
    channel?: string
    page?: number
    pageSize?: number
  } = {},
) {
  return apiGet<AdminFinanceTransactionResult>('/api/v1/admin/finance/transactions', params)
}
