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

import { API_V1_PREFIX } from "./paths";

import type { AdminPlayerTicketItemsData } from "@/types/api/admin-player-tickets";

const A = `${API_V1_PREFIX}/admin`;

export async function getAdminPlayerTicketItems(
  playerId: number,
  params?: {
    page?: number;
    per_page?: number;
    draw_no?: string;
    status?: string[];
    number?: string;
    start_date?: string;
    end_date?: string;
  },
): Promise<AdminPlayerTicketItemsData> {
  return adminRequest.get<AdminPlayerTicketItemsData>(
    `${A}/players/${playerId}/ticket-items`,
    { params },
  );
}
