// SPDX-License-Identifier: GPL-3.0-only
// The club's surroundings: three youth teams and three members of staff, six cards in two
// rows. Each card carries its monthly budget as a row of stars, its picture and its cost.
std::string App::render_environment() {
const auto snapshot = engine_mode_ ? Snapshot{input_revision(), world_, Json::object()} : snap();
const std::string unavailable = "
Die Umfeldvorschau ist derzeit nicht verfügbar.
";
if (!snapshot.world) return unavailable;
const auto view = engine_mode_ ? engine_environment_projection(engine_data_) : demo_environment_rows(snapshot.state, *snapshot.world);
if (!view.value("ok", false)) return unavailable;
const auto currency = engine_mode_ ? Json{{"code", "EUR"}, {"minor_units", 2}} : snapshot.world->manifest().value("currency", Json::object());
const auto star = [&](bool active) {
const std::string colour = active ? (theme_ == "silver" ? "#b2622d" : theme_ == "matchday" ? "#3f7a3a" : "#e0a25f") : (theme_ == "silver" ? "#c0b6a5" : theme_ == "matchday" ? "#afc09a" : "#525966");
const std::string svg = "