{% assign is_partner = false %}
{% assign filter_partners = false %}
{% for group in current_person.groups %}
  {% if group.name == "All Partners" %}
    {% assign is_partner = true %}
  {% endif %}
{% endfor %}

{% if filter_partners == false %}
  {% assign is_partner = true %}
{% endif %}

{% if courses.enrolled.any? %}

  <div class="row np-catalog-courses nintex-cards-container">

    {% for course in courses.enrolled %}
      {% for category in course.categories %}
        {% if category.name contains "Nintex Partner Sales" and is_partner == false %}
          {% continue %}
        {% endif %}
      {% endfor %}

      <div class="{{ class }} display-flex">
        {% include "cards_course_nintex" with course %}
      </div>
    {% endfor %}

  </div>

  <div class="np-courses-resources-container" style="display: none;">
    <div class="np-zero-state-text">
      <span class="lang-en-US">
        No courses found
      </span>
      <span class="lang-es">
        No se encontraron cursos
      </span>
      <span class="lang-fr">
        Aucun cours trouvé
      </span>
      <span class="lang-de">
        Keine Kurse gefunden
      </span>
      <span class="lang-en-GB">
        No courses found
      </span>
      <span class="lang-nl">
        Geen cursussen gevonden
      </span>
      <span class="lang-pt-BR">
        Nenhum curso encontrado
      </span>
    </div>
    <img class="np-zero-state-courses" alt="{% t .empty %}" />
  </div>

{% else %}
  <div class="np-courses-resources-container" style="margin-top: 60px;">
    {% capture message %}
      {% t shared.zero_state.courses.index,
        key: current_school.course_vocabulary
      %}
    {% endcapture %}
    <div class="np-zero-state-text">
      {{ message }}
    </div>
    <img class="np-zero-state-courses" alt="{{ message }}" />
  </div>
{% endif %}