[
  {
    "//": "Extend with the danger widget",
    "copy-from": "legacy_classic_sidebar",
    "type": "widget",
    "id": "legacy_classic_sidebar",
    "extend": { "widgets": [ "iso_danger", "mana_for_last_scion" ] }
  },
  {
    "//": "Extend with the danger widget",
    "copy-from": "legacy_compact_sidebar",
    "type": "widget",
    "id": "legacy_compact_sidebar",
    "extend": { "widgets": [ "iso_danger", "mana_for_last_scion" ] }
  },
  {
    "//": "Extend with the danger widget",
    "copy-from": "legacy_labels_narrow_sidebar",
    "type": "widget",
    "id": "legacy_labels_narrow_sidebar",
    "extend": { "widgets": [ "iso_danger", "mana_for_last_scion" ] }
  },
  {
    "//": "Extend with the danger widget",
    "copy-from": "legacy_labels_sidebar",
    "type": "widget",
    "id": "legacy_labels_sidebar",
    "extend": { "widgets": [ "iso_danger", "mana_for_last_scion" ] }
  },
  {
    "//": "Extend with the danger widget",
    "copy-from": "structured_sidebar",
    "type": "widget",
    "id": "structured_sidebar",
    "extend": { "widgets": [ "iso_danger", "mana_for_last_scion" ] }
  },
  {
    "//": "Extend with the danger widget",
    "copy-from": "spacebar",
    "type": "widget",
    "id": "spacebar",
    "extend": { "widgets": [ "iso_danger", "spacebar_last_scion_mana_bar_block" ] }
  },
  {
    "id": "iso_danger",
    "type": "widget",
    "label": "Ambient normality",
    "style": "text",
    "clauses": [
      {
        "id": "safe",
        "text": "Stable",
        "color": "light_green",
        "condition": { "or": [ { "u_at_om_location": "iso_hallway_safe" }, { "u_at_om_location": "iso_elevator_safe" } ] }
      },
      {
        "id": "ok",
        "text": "Deteriorating",
        "color": "light_gray",
        "condition": {
          "and": [
            { "math": [ "u_ISO_CURRENT_LEVEL_DANGER >= 0" ] },
            { "math": [ "u_ISO_CURRENT_LEVEL_DANGER < 15" ] },
            {
              "not": { "or": [ { "u_at_om_location": "iso_hallway_safe" }, { "u_at_om_location": "iso_elevator_safe" } ] }
            }
          ]
        }
      },
      {
        "id": "wrong",
        "text": "Distorted",
        "color": "dark_gray",
        "condition": { "and": [ { "math": [ "u_ISO_CURRENT_LEVEL_DANGER >= 15" ] }, { "math": [ "u_ISO_CURRENT_LEVEL_DANGER < 20" ] } ] }
      },
      {
        "id": "bad",
        "text": "Unstable",
        "color": "magenta",
        "condition": { "and": [ { "math": [ "u_ISO_CURRENT_LEVEL_DANGER >= 20" ] }, { "math": [ "u_ISO_CURRENT_LEVEL_DANGER < 25" ] } ] }
      },
      {
        "id": "vbad",
        "text": "Unraveling",
        "color": "pink",
        "condition": { "and": [ { "math": [ "u_ISO_CURRENT_LEVEL_DANGER >= 25" ] } ] }
      }
    ]
  },
  {
    "id": "spacebar_last_scion_mana_bar_block",
    "type": "widget",
    "style": "layout",
    "label": "mana_bar",
    "arrange": "minimum_columns",
    "widgets": [ "spacebar_separator_2", "mana_for_last_scion" ]
  },
  {
    "id": "mana_for_last_scion",
    "type": "widget",
    "style": "text",
    "label": "Mana",
    "flags": [ "W_DISABLED_WHEN_EMPTY" ],
    "clauses": [
      {
        "id": "mana_numbers",
        "text": "<color_pink><u_val:last_scion_mana></color>         Max: <color_pink><u_val:last_scion_max_mana></color>        %: <color_pink><u_val:last_scion_max_percent></color>",
        "parse_tags": true,
        "condition": { "u_has_trait": "iso_eldritch_sorcery" }
      }
    ],
    "padding": 0
  }
]
