import { adminRequest } from "@/lib/admin-http";


import type {
  AdminReportDailyProfitRow,
  AdminReportListData,
  AdminReportPlayDimensionRow,
  AdminReportPlayerWinLossRow,
  AdminReportQueryParams,
} from "@/types/api/admin-reports";

const A = `/admin`;

export async function getAdminReportDailyProfit(
  params: AdminReportQueryParams,
): Promise<AdminReportListData<AdminReportDailyProfitRow>> {
  return adminRequest.get<AdminReportListData<AdminReportDailyProfitRow>>(`${A}/reports/daily-profit`, {
    params,
  });
}

export async function getAdminReportPlayerWinLoss(
  params: AdminReportQueryParams,
): Promise<AdminReportListData<AdminReportPlayerWinLossRow>> {
  return adminRequest.get<AdminReportListData<AdminReportPlayerWinLossRow>>(`${A}/reports/player-win-loss`, {
    params,
  });
}

export async function getAdminReportPlayDimension(
  params: AdminReportQueryParams,
): Promise<AdminReportListData<AdminReportPlayDimensionRow>> {
  return adminRequest.get<AdminReportListData<AdminReportPlayDimensionRow>>(`${A}/reports/play-dimension`, {
    params,
  });
}
