{% set courses = courses_created if courses_created else get_authored_courses(user or None, only_published or False) %}

{% if courses | length %}
<div class="cards-parent">
    {% for course in courses %}
    {{ widgets.CourseCard(course=course) }}
    {% endfor %}
</div>

{% else %}
<div class="empty-state">
    <img class="icon icon-xl" src="/assets/lms/icons/comment.svg">
    <div class="empty-state-text">
        <div class="empty-state-heading">{{ _("No courses created") }}</div>
        <div class="course-meta">{{ _("Help others learn something new by creating a course.") }}</div>
    </div>
</div>
{% endif %}
