import { hasLotteryAdminApiBaseUrl, publicAdminRequest } from "@/lib/admin-http";
import type { DrawCurrentSnapshot } from "@/types/api/public-draw";


/** 大厅当前期（无需 Bearer） */
export async function getDrawCurrent(): Promise<DrawCurrentSnapshot | null> {
  if (!hasLotteryAdminApiBaseUrl()) {
    return null;
  }
  try {
    return await publicAdminRequest<DrawCurrentSnapshot | null>({
      url: `/draw/current`,
      method: "GET",
    });
  } catch {
    return null;
  }
}
