#pragma once

#include <optional>
#include <string>
#include <vector>

#include <QPoint>

#include "ShipLayout.h"

struct ArenaStationEntry
{
    std::string stationType;  // "player_station" or "enemy_station"
    int level;
    QPoint position;
};

struct ArenaShipEntry
{
    std::string schematicId;
    int count;
    std::optional<ShipLayoutConfig> layout;
};

struct ArenaTeamConfig
{
    std::string name;
    std::vector<ArenaShipEntry> ships;
    std::vector<ArenaStationEntry> stations;
};

struct ArenaConfig
{
    std::string name;
    int heightTiles;
    int playerBufferWidth_tiles;
    int contestZoneWidth_tiles;
    int enemyBufferWidth_tiles;
    ArenaTeamConfig teams[2];
};

struct BalancingConfig
{
    std::vector<ArenaConfig> arenas;
};

BalancingConfig loadBalancingConfig(const std::string& path);
