{% macro status(status, icon_left, icon_right, class) %}

  {% set statuses = [
    {'status':'good', 'icon_left': global_status_icon_good|default('fas fa-check-circle'), 'icon_right': null},
    {'status':'minor', 'icon_left': global_status_icon_minor|default('fas fa-exclamation-circle'), 'icon_right': null},
    {'status':'major', 'icon_left': global_status_icon_major|default('fas fa-exclamation-triangle'), 'icon_right': null},
    {'status':'stationalert', 'icon_left': global_status_icon_stationalert|default('fas fa-info-circle'), 'icon_right': null},
    {'status':'noservice', 'icon_left': global_status_icon_noservice|default('fas fa-exclamation-circle'), 'icon_right': null},
    {'status':'amended', 'icon_left': global_status_icon_amended|default('fas fa-exclamation-circle'), 'icon_right': null},
    {'status':'strike', 'icon_left': global_status_icon_strike|default('fas fa-exclamation-circle'), 'icon_right': null},
  ] %}

  {% for item in statuses %}
    {% if status == item.status %}
      {% set icon_left = icon_left ? icon_left : item.icon_left %}
      {% set icon_right = icon_right ? icon_right : item.icon_right %}
      {% set class = [status, class]|join(' ') %}
    {% endif %}
  {% endfor %}

{% endmacro %}
