export interface CreateGameInput {
  name: string
  slug: string
  generation: number
  region: string
  boxArtUrl?: string | null
  releaseYear?: number | null
}

export interface UpdateGameInput {
  name?: string
  slug?: string
  generation?: number
  region?: string
  boxArtUrl?: string | null
  releaseYear?: number | null
}

export interface CreateRouteInput {
  name: string
  order: number
  parentRouteId?: number | null
  pinwheelZone?: number | null
}

export interface UpdateRouteInput {
  name?: string
  order?: number
  pinwheelZone?: number | null
}

export interface RouteReorderItem {
  id: number
  order: number
}

export interface CreatePokemonInput {
  pokeapiId: number
  nationalDex: number
  name: string
  types: string[]
  spriteUrl?: string | null
}

export interface UpdatePokemonInput {
  pokeapiId?: number
  nationalDex?: number
  name?: string
  types?: string[]
  spriteUrl?: string | null
}

export interface BulkImportResult {
  created: number
  updated: number
  errors: string[]
}

export interface PaginatedPokemon {
  items: import('./game').Pokemon[]
  total: number
  limit: number
  offset: number
}

export interface CreateRouteEncounterInput {
  pokemonId: number
  gameId: number
  encounterMethod: string
  encounterRate: number
  minLevel: number
  maxLevel: number
}

export interface UpdateRouteEncounterInput {
  encounterMethod?: string
  encounterRate?: number
  minLevel?: number
  maxLevel?: number
}

export interface EvolutionAdmin {
  id: number
  fromPokemonId: number
  toPokemonId: number
  fromPokemon: import('./game').Pokemon
  toPokemon: import('./game').Pokemon
  trigger: string
  minLevel: number | null
  item: string | null
  heldItem: string | null
  condition: string | null
  region: string | null
}

export interface PaginatedEvolutions {
  items: EvolutionAdmin[]
  total: number
  limit: number
  offset: number
}

export interface CreateEvolutionInput {
  fromPokemonId: number
  toPokemonId: number
  trigger: string
  minLevel?: number | null
  item?: string | null
  heldItem?: string | null
  condition?: string | null
  region?: string | null
}

export interface UpdateEvolutionInput {
  fromPokemonId?: number
  toPokemonId?: number
  trigger?: string
  minLevel?: number | null
  item?: string | null
  heldItem?: string | null
  condition?: string | null
  region?: string | null
}

// Pokemon encounter locations (detail card)
export interface PokemonEncounterLocationItem {
  routeId: number
  routeName: string
  encounterMethod: string
  encounterRate: number
  minLevel: number
  maxLevel: number
}

export interface PokemonEncounterLocation {
  gameId: number
  gameName: string
  encounters: PokemonEncounterLocationItem[]
}

// Boss battles admin
export interface CreateBossBattleInput {
  name: string
  bossType: string
  specialtyType?: string | null
  badgeName?: string | null
  badgeImageUrl?: string | null
  levelCap: number
  order: number
  afterRouteId?: number | null
  location: string
  section?: string | null
  spriteUrl?: string | null
}

export interface UpdateBossBattleInput {
  name?: string
  bossType?: string
  specialtyType?: string | null
  badgeName?: string | null
  badgeImageUrl?: string | null
  levelCap?: number
  order?: number
  afterRouteId?: number | null
  location?: string
  section?: string | null
  spriteUrl?: string | null
}

export interface BossReorderItem {
  id: number
  order: number
}

export interface BossPokemonInput {
  pokemonId: number
  level: number
  order: number
  conditionLabel?: string | null
}

// Genlocke admin
export interface UpdateGenlockeInput {
  name?: string
  status?: string
}

export interface AddGenlockeLegInput {
  gameId: number
}
