<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

{% assign module_1 = "b6a25df2-c173-4824-89ad-c867ceed3218" %}
{% assign module_2 = "3099b371-53d4-4969-a97c-3d86d09e445e" %}
{% assign module_2_extra = "e540e0b6-793d-44f8-8635-02db1ae81ef8" %}
{% assign module_3 = "bce4b7c9-4fdf-46fc-b641-85bddb18060f" %}
{% assign module_4 = "c9301769-2db1-4324-89e3-249ed57c4e14" %}
{% assign module_5 = "12a10ead-9360-4546-85e3-98d92dfad4eb" %}
{% assign module_6 = "53828f84-2a22-43d1-b5e4-b4778576e578" %}
{% assign module_7 = "657d2693-2fb2-40b7-b413-c5dfc03eda6c" %}
{% assign module_8 = "63db738f-3971-40cc-9189-51967ad0a789" %}
{% assign module_9 = "36d1df1d-5515-4750-addd-0ce6ad671cf8" %}
{% assign module_10 = "6c670f03-7b9b-4ff1-b9f5-024911524421" %}
{% assign module_11 = "5a0478b8-81ba-4e08-9822-3ff9172eb777" %}
{% assign module_12 = "3e29c707-b4fc-4f92-b585-28a10a8d6411" %}
{% assign module_evaluation = "fee66176-9c39-4274-a00d-7945e90a9c65" %}

{% assign fellowship_group_id = "f9421853-6e4c-46bb-b0f6-f45cd20b96af" %}
{% assign selfguided_group_id = "d936bdc2-7dc6-4c99-9af0-960f4c2cb25d" %}
{% assign rolling_admission_group_id = "8f987357-1bd4-4ce7-bf50-7c47986597ad" %}

{% assign course_release_hour = 14 %}

{% if courses.enrolled.any? %}
  <div class="row row-with-thumbnails">
    {% for course in courses.enrolled %}
      {% if course.id == module_1 %}
        <div class="{{ class }} fellowship-course module-1">
          {% include "cards_course" with course %}
        </div>
      {% elsif course.id == module_2 %}
        <div class="{{ class }} fellowship-course module-2">
          {% include "cards_course" with course %}
        </div>
      {% elsif course.id == module_2_extra %}
        <div class="{{ class }} fellowship-course module-2-extra">
          {% include "cards_course" with course %}
        </div>
      {% elsif course.id == module_3 %}
        <div class="{{ class }} fellowship-course module-3">
          {% include "cards_course" with course %}
        </div>
      {% elsif course.id == module_4 %}
        <div class="{{ class }} fellowship-course module-4">
          {% include "cards_course" with course %}
        </div>
      {% elsif course.id == module_5 %}
        <div class="{{ class }} fellowship-course module-5">
          {% include "cards_course" with course %}
        </div>
      {% elsif course.id == module_6 %}
        <div class="{{ class }} fellowship-course module-6">
          {% include "cards_course" with course %}
        </div>
      {% elsif course.id == module_7 %}
        <div class="{{ class }} fellowship-course module-7">
          {% include "cards_course" with course %}
        </div>
      {% elsif course.id == module_8 %}
        <div class="{{ class }} fellowship-course module-8">
          {% include "cards_course" with course %}
        </div> 
      {% elsif course.id == module_9 %}
        <div class="{{ class }} fellowship-course module-9">
          {% include "cards_course" with course %}
        </div> 
      {% elsif course.id == module_10 %}
        <div class="{{ class }} fellowship-course module-10">
          {% include "cards_course" with course %}
        </div>  
      {% elsif course.id == module_11 %}
        <div class="{{ class }} fellowship-course module-11">
          {% include "cards_course" with course %}
        </div> 
      {% elsif course.id == module_12 %}
        <div class="{{ class }} fellowship-course module-12">
          {% include "cards_course" with course %}
        </div>   
      {% elsif course.id == module_evaluation %}
        <div class="{{ class }} fellowship-course module-evaluation">
          {% include "cards_course" with course %}
        </div>   
      {% else %}
        <div class="{{ class }}">
          {% include "cards_course" with course %}
        </div>
      {% endif %}
    {% endfor %}

    {% for group in current_person.groups %}
      {% if group.id == selfguided_group_id %}
        {% assign self_guided_enrollment_date = group.enrolled_at %}
        {% include "self_guided_fellowship_schedule" %}
      {% elsif group.id == rolling_admission_group_id %}
        {% assign rolling_admission_enrollment_date = group.enrolled_at %}
        {% include "rolling_admission_group_schedule" %}
      {% elsif group.id == fellowship_group_id %}
        {% assign fellowship_enrollment_date = group.enrolled_at %}
        {% include "fellowship_course_schedule" %}
      {% endif %}
    {% endfor %}

  </div>

{% else %}
  {% capture message %}
    {% t shared.zero_state.courses.index,
      key: current_school.course_vocabulary
    %}
  {% endcapture %}
  {% include "courses_zero_state", message: message %}
{% endif %}
