{% set member = frappe.get_doc("User", frappe.session.user) %}
<div class="mt-10">
  {% set enrolled = member.get_enrolled_courses().in_progress + member.get_enrolled_courses().completed %}
  {% if enrolled | length %}
  <div class="mt-8">
    <div class="course-home-headings">
      {{ _("Courses Enrolled") }}
    </div>
    <div class="cards-parent">
      {% for course in enrolled %}
      {{ widgets.CourseCard(course=course) }}
      {% endfor %}
    </div>
  </div>
  {% else %}
  {% set site_name = frappe.db.get_single_value("System Settings", "app_name") %}
  <div class="empty-state">
    <div class="course-home-headings text-center mb-0" style="color: inherit;">You haven't enrolled for any courses</div>
    <p class="small text-center mb-8">Here are a few courses we recommend for you to get started with {{ site_name }}</p>
    {% set recommended_courses = [course1, course2, course3] %}
    <div class="cards-parent">
    {% for recommended_course in recommended_courses %}
    {% if recommended_course %}
    {% set course_details = frappe.get_doc("LMS Course", recommended_course) %}
    {{ widgets.CourseCard(course=course_details) }}
    {% endif %}
    {% endfor %}
    </div>
  </div>
  {% endif %}
</div>
