import { api } from './client'
import type { BossBattle, BossResult, CreateBossResultInput } from '../types/game'

export function getGameBosses(gameId: number): Promise<BossBattle[]> {
  return api.get(`/games/${gameId}/bosses`)
}

export function getBossResults(runId: number): Promise<BossResult[]> {
  return api.get(`/runs/${runId}/boss-results`)
}

export function createBossResult(runId: number, data: CreateBossResultInput): Promise<BossResult> {
  return api.post(`/runs/${runId}/boss-results`, data)
}

export function deleteBossResult(runId: number, resultId: number): Promise<void> {
  return api.del(`/runs/${runId}/boss-results/${resultId}`)
}
