{% if application.elements[region] is defined %}
  {% if region_props[region] is defined and region_props[region].name == region and region_props[region].properties | length > 0 %}
      {% if region_props[region].properties['name'] == 'tabs' %}
        <div class="tabContainerAlt">
          <ul class="tabs">
            {%  for element in application.elements[region] %}
              <li id="tab{{loop.index}}" class="tab{% if loop.first %} active{% endif %}">{{ element.title | trans }}</li>
            {% endfor %}
          </ul>
            {%  for element in application.elements[region] %}
              <div id="container{{loop.index}}" class="container{% if loop.first %} active{% endif %}">
                {{ element.render() | raw }}
              </div>
            {% endfor %}
        </div>
      {% elseif region_props[region].properties['name'] == 'accordion' %}
        <div class="accordionContainer">
          {%  for element in application.elements[region] %}
            <div id="accordion{{loop.index}}" class="accordion{% if loop.first %} active{% endif %}"><div class="tablecell">{{ element.title | trans }}</div></div>
            <div id="container{{loop.index}}" class="container-accordion{% if loop.first %} active{% endif %}">
                <div class="accordion-cell">
                    <div class="accordion-wrapper">
                    {{ element.render() | raw }}
                    </div>
                </div>
            </div>
            {% endfor %}
        </div>
      {% else %}
        {% for element in application.elements[region] %}
          {{ element.render() | raw }}
        {% endfor %}
      {% endif %}
    {#% endfor %#}
  {% else %}
    {% for element in application.elements[region] %}
      {{ element.render() | raw }}
    {% endfor %}
  {% endif %}
{% endif %}
