{% from "components/map/marker-shape.html.njk" import markerShape, icon %} {% macro renderCategoryValue(categoryValue) %} {% set activeChildrenCount = 0 %} {% for optionValue in categoryValue.children %} {% if optionValue.option.displayInInfoBar %} {% set activeChildrenCount = activeChildrenCount + 1 %} {% endif %} {% endfor %} {% set wrapOptionsIntoCategoryContainer = activeChildrenCount > 0 %} {% if wrapOptionsIntoCategoryContainer %}
{% endif %} {% if categoryValue.category.displayInInfoBar %}

{{ categoryValue.category.name }}

{% endif %} {% if categoryValue.category.displaySuboptionsInline %}
{% endif %} {% for optionValue in categoryValue.children %} {% set option = optionValue.option %} {% if option.displayInInfoBar and not option.isHidden %} {% if categoryValue.category.displaySuboptionsInline %} {% set optionClass = 'inline' %} {% elseif option.enableDescription or categoryValue.category.enableDescription %} {% set optionClass = 's6 m5' %} {% else %} {% set optionClass = 's12' %} {% endif %} {% if not categoryValue.category.displaySuboptionsInline %}
{% endif %} {# Option Icon and Name #} {% if option.url %}{% endif %} {% if option.icon %} {{ icon(option.icon, "icon gogo-color-as", option.id) }} {% elif option.useColorForMarker or option.markerShape %} {% set shape = option.markerShape if option.markerShape else config.marker.defaultShape %} {{ markerShape(shape, 'icon gogo-color-as', option.id) }} {% endif %} {{ option.name }} {% if option.url %}{% endif %} {% if option.url %}{% endif %} {# Option Description #} {% if (option.enableDescription or categoryValue.category.enableDescription) and not categoryValue.category.displaySuboptionsInline %} {{ optionValue.description|safe }} {% endif %} {% if not categoryValue.category.displaySuboptionsInline %}
{% endif %} {% endif %} {# Render children #} {% if optionValue.option.displayChildrenInInfoBar and not option.isHidden %} {% for subcategory in optionValue.children %} {{ renderCategoryValue(subcategory) }} {% endfor %} {% endif %} {% endfor %} {% if categoryValue.category.displaySuboptionsInline %}
{% endif %} {% if wrapOptionsIntoCategoryContainer %}
{% endif %} {% endmacro %}