#include "SelectionNames.h"

#include <QObject>

#include "DisplayName.h"

QString getBuildingTypeName(BuildingType type)
{
    // "Hq" would read as a word rather than an acronym through the generic conversion,
    // and the player's own base deserves naming as such.
    if (type == BuildingType::Hq)
    {
        return QObject::tr("Player HQ");
    }
    return QString::fromStdString(toDisplayName(buildingTypeId(type)));
}

QString getBehaviorLabel(BehaviorKind kind)
{
    // Only the winning behavior is named; the salvage and repair cycles that run
    // regardless of it are not behaviors here (REQ-UI-SHIP-BEHAVIOR).
    switch (kind)
    {
        case BehaviorKind::Retreat:      return QObject::tr("Retreating");
        case BehaviorKind::Attack:       return QObject::tr("Engaging");
        case BehaviorKind::SalvageScrap:
        case BehaviorKind::DeliverScrap: return QObject::tr("Salvaging");
        case BehaviorKind::Repair:       return QObject::tr("Repairing");
        case BehaviorKind::Rally:        return QObject::tr("Rallying");
        case BehaviorKind::Standby:      return QObject::tr("Standby");
        case BehaviorKind::Advance:      return QObject::tr("Advancing");
        case BehaviorKind::None:         break;
    }
    return QString();
}
