{% include "subheader_search" %}{% include "back_button" %}
{% comment %} Check if there are any learning paths in progress {% endcomment %}
{% assign hasInProgressPaths = false %}
{% for learning_path in learning_paths.enrolled %}
  {% if learning_path.progress > 0 and learning_path.progress < 100 %}
    {% assign hasInProgressPaths = true %}
    {% break %}
  {% endif %}
{% endfor %}

<main class="np-main np-learning-paths np-subpage-container np-max-width">
  <div class="np-learning-paths-main">
    {% if hasInProgressPaths %}
      <div>
        <div class="global-section-title">
          <span class="lang-en">In progress</span>
          <span class="lang-es">En progreso</span>
        </div>
        <div class="global-section-subtitle">
          <span class="lang-en">Continue where you left off</span>
          <span class="lang-es">Continúa donde lo dejaste</span>
        </div>

        {% include "learning_paths_carousel"
          , breakpoint: 768
          , showOnlyInProgress: true
          , sortByPriority: true
          , showAllOnNoResults: false
          , hideOnlyCompleted: false
          , minified: true %}
      </div>
    {% endif %}
    <div class="global-section-title">
      <span class="lang-en">Master A New Skill</span>
      <span class="lang-es">Domina Una Nueva Habilidad</span>
    </div>
    <div class="global-section-subtitle">
      <span class="lang-en">Go more in-depth with our learning paths.</span>
      <span class="lang-es">Profundiza más con nuestras rutas de aprendizaje.</span>
    </div>
    {%
      include "filter_dropdown"
      , givenId: "learning_paths_filter"
    %}
    {% include "learning_paths_index"
      , items: learning_paths.available
      , eventId: "learning_paths_filter" %}
  </div>
</main>
{% include "footer" %}