// Game-related TypeScript interfaces and types

export interface PlayerState {
  location_id: string
  location_name: string
  health: number
  max_health: number
  stamina: number
  max_stamina: number
  inventory: any[]
  status_effects: StatusEffect[]
}

export interface StatusEffect {
  id: number
  effect_name: string | any
  effect_icon: string
  effect_type: string
  damage_per_tick: number
  value: number
  ticks_remaining: number
}

export interface DirectionDetail {
  direction: string
  stamina_cost: number
  distance: number
  destination: string
  destination_name?: string | { [key: string]: string }
}

export interface Location {
  id: string
  name: string | { [key: string]: string }
  description: string | { [key: string]: string }
  directions: string[]
  directions_detailed?: DirectionDetail[]
  danger_level?: number
  npcs: any[]
  items: any[]
  image_url?: string
  interactables?: any[]
  other_players?: any[]
  corpses?: any[]
  tags?: string[]
}

export interface Profile {
  name: string
  level: number
  xp: number
  hp: number
  max_hp: number
  stamina: number
  max_stamina: number
  strength: number
  agility: number
  endurance: number
  intellect: number
  unspent_points: number
  is_dead: boolean
  max_weight?: number
  current_weight?: number
  max_volume?: number
  current_volume?: number

  status_effects?: StatusEffect[]
}

export interface CombatLogEntry {
  id: string | number
  time: string
  message: string | { type: string; data: any }
  isPlayer: boolean
}

export interface LocationMessage {
  time: string
  message: string
  location_name?: string | { [key: string]: string }
}

export interface Equipment {
  [slot: string]: any
}

export interface CombatState {
  is_pvp?: boolean
  in_pvp_combat?: boolean
  pvp_combat?: any
  combat_over?: boolean
  [key: string]: any
}

export type WorkbenchTab = 'craft' | 'repair' | 'uncraft'
export type MobileMenuState = 'none' | 'left' | 'right' | 'bottom'
