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


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

const A = `/admin`;

export type TicketItemsListQuery = {
  page?: number;
  per_page?: number;
  player_id?: number;
  player_account?: string;
  site_code?: string;
  agent_node_id?: number;
  draw_no?: string;
  status?: string[];
  number?: string;
  start_date?: string;
  end_date?: string;
};

export async function getAdminTicketItems(
  q: TicketItemsListQuery = {},
): Promise<AdminTicketItemsData> {
  return adminRequest.get<AdminTicketItemsData>(`${A}/tickets`, { params: q });
}
