{% include "header" %}
{% include "course_version_outdated_alert", courses: courses.enrolled %}
{% include "sub_navigation" %}
<main class="np-main np-dashboard np-subpage-container np-max-width">
  <div class="np-dashboard-header">
      <div class="np-resource-title">Hi {{current_person.first_name}}!</div>
      <div class="np-resource-subtitle">Welcome to Mizuno Golf Academy</div>
    </div>
  <div class="row np-flex-center">
    {% if features.learning_paths? %}
      <div class="col-xs-12 col-md-8">
        <div class="np-dashboard-resources-title">
          {% t shared.learning_paths %}
        </div>
        {% include "learning_paths_index", items: learning_paths.enrolled %}
      </div>
      <div class="np-grid-spacing col-xs-12 col-md-4">
        <div class="np-dashboard-resources-title">Course Progress</div>
        {% include "widget_course_progress" %}

        {%- comment -%} <div class="np-dashboard-resources-title">Recent Achievements</div>
        {% include "widget_achievements" %} {%- endcomment -%}
      </div>
    {% else %}
        <div class="course-progress-wrapper col-xs-12 col-md-6 offset-lg-1">
          <div class="np-dashboard-resources-title">Course Progress</div>
          {% include "widget_course_progress" %}
        </div>
        {%- comment -%} <div class="achievements-wrapper col-xs-12 col-md-6">
          <div class="np-dashboard-resources-title">Recent Achievements</div>
          {% include "widget_achievements" %}
        </div> {%- endcomment -%}
    {% endif %}
  </div>

  <div class="np-dashboard-resources-title" style="margin-bottom:19px;">
    Courses
  </div>
  <div class="row dashboard-section-courses col-xs-12">
    {% if courses.enrolled.any? %}
      {% for course in courses.enrolled %}
        {% assign course_status = "" %}

        {% if course.started? == false  %}
          {% assign course_status = "not-started" %}
        {% elsif course.completed?  %}
          {% assign course_status = "completed" %}
        {% elsif course.started?  %}
          {% assign course_status = "in-progress" %}
        {% endif %}

        <div class="np-carousel-card col-xs-12 col-md-4 {{course_status}}"> {% include "cards_course" with course %}</div>
      {% endfor %}
    {% else %}
        {% capture message %}
          {% t shared.zero_state.courses.index,
            key: current_school.course_vocabulary
          %}
        {% endcapture %}
        <div style="margin-bottom:3rem;">
          {% include "courses_zero_state", message: message %}
        </div>
    {% endif %}
  </div>
.

  {% comment %} <div class="row dashboard-section-events">
    <div class="col-xs-12">
      <div class="np-dashboard-resources-title">
        {% t .upcoming_events %}
      </div>
      {% if training_events.enrolled.any? %}
        {% 
        include "carousel_events", 
        items: training_events.enrolled,
        %}
      {% else %}
      <div style="margin-bottom:3rem;">
        {% include "training_events_zero_state" %}
      </div>
      
      {% endif %}
    </div>
  </div> {% endcomment %}
</main>
{% include "footer" %}
