#pragma once

#include <map>
#include <string>

#include <QColor>
#include <QString>

#include "BuildingType.h"

struct TileVisuals
{
    QColor fill;
};

struct BuildingVisuals
{
    QColor  fill;
    QColor  outline;
    QString glyph;
};

struct ItemVisuals
{
    QColor fill;
    QColor outline;
};

struct ShipVisuals
{
    QColor fill;
    QColor outline;
};

struct BeamVisuals
{
    QColor weaponColor;
    QColor repairColor;
    QColor salvageColor;
    int    widthPx;
};

struct OverlayVisuals
{
    QColor ghostValid;
    QColor ghostInvalid;
    QColor deconstructTint;
    QColor tileHighlight;
    QColor selectedOutline;
    QColor configTransfer;  // blueprint ghost over a transfer target (REQ-UI-BLUEPRINT-TRANSFER)
    QColor lockedAsteroid;
    // Tint over the columns the next expansion unlocks, lighter than lockedAsteroid so
    // the ground one purchase away reads apart from the ground behind it
    // (REQ-UI-LOCKED-ASTEROID).
    QColor nextExpansion;
    QColor modalDim;
    QColor tunnelPreview;   // tunnel connection preview highlight (REQ-BLD-TUNNEL-MODE)
};

struct ToastVisuals
{
    QColor bg;
    QColor fg;
    int    fontSize;
};

// Fill colors for the building status light (REQ-UI-STATUS-LIGHT), plus its
// constant outline color.
struct StatusLightVisuals
{
    QColor grey;    // no recipe/schematic selected
    QColor green;   // producing
    QColor red;     // idle, input missing (or Salvage Bay empty)
    QColor yellow;  // idle, output buffer full
    QColor outline;
};

struct VisualsConfig
{
    TileVisuals asteroid;
    TileVisuals space;

    std::map<BuildingType, BuildingVisuals> buildings;
    std::map<std::string,  ItemVisuals>     items;
    std::map<std::string,  ShipVisuals>     ships;

    BeamVisuals        beams;
    OverlayVisuals     overlays;
    ToastVisuals       toast;
    StatusLightVisuals statusLight;
};
