{% set view_tag = view_tag|default('div') %}

<{{ view_tag }}{{ attributes }}>
  {% block view_sticky %}
    {{ view_sticky }}
  {% endblock %}

  {% if exposed or header %}
    <header class="view__header">
      {% if exposed %}
        <div class="view__filters">
          {{ exposed }}
        </div>
      {% endif %}

      {% if header %}
        <div class="view__header-content">
          {{ header }}
        </div>
      {% endif %}
    </header>
  {% endif %}

  <div class="view__content">
    {% block view_content %}
      {% if attachment_before %}
        <div class="view__attachment view__attachment--before">
          {{ attachment_before }}
        </div>
      {% endif %}

      {% if rows %}
        <div class="view__rows">
          {{ rows }}
        </div>
      {% endif %}

      {{ empty }}

      {% if pager %}
        <div class="view__pager">
          {{ pager }}
        </div>
      {% endif %}

      {% if attachment_after %}
        <div class="view__attachment view__attachment--after">
          {{ attachment_after }}
        </div>
      {% endif %}

      {% if more %}
        <div class="view__more-link">
          {{ view_more }}
        </div>
      {% endif %}
    {% endblock %}
  </div>

  {% if footer %}
    <footer class="view__footer">
      {{ footer }}
    </footer>
  {% endif %}
</{{ view_tag }}>
