{% assign counter = 0 %}
<div class="carousel-wrapper">
    <div class="my-courses-carousel">
        {% for course in courses.enrolled %}
            {% if course.progress == 100 %}    
                <div class="card-wrapper">
                    {% include 'cards_course' %}
                </div>
                {% assign counter = counter | plus: 1 %}
            {% endif %}
          {% endfor %}
    </div>
    {% if counter == 0 %}
        <div class="zero-state-wrapper">
            <img class="zero-img" src="https://s3.amazonaws.com/static.northpass.com/Cin7/zero+state/no+completed+courses+(no+button).png" alt="">
            <div class="zero-button-wrapper">
                <a class="lp-button" href="/app/catalog">Start learning now!</a>
            </div>
        </div>
    {% endif %}
</div>

<script>
    $('.my-courses-carousel').slick({
    infinite: true,
    slidesToShow: 4,
    slidesToScroll: 4,
    prevArrow: "<i class='control-carousel fas fa-chevron-left left-arrow'></i>",
    nextArrow: "<i class='control-carousel fas fa-chevron-right right-arrow'></i>",
    responsive: [
    {
      breakpoint: 1200,
      settings: {
        slidesToShow: 3,
        slidesToScroll: 3,
        infinite: true
      }
    },
    {
      breakpoint: 768,
      settings: {
        slidesToShow: 1,
        slidesToScroll: 1
      }
    }
  ]
    });
</script>

<style>
    .slick-track {
        display: flex;
    }
    .card {
        height: 100%;;
    }
    .card-wrapper {
        padding: 1rem 0;
        height: auto;
    }
    .my-courses-carousel {
        margin: 0 1rem;
    }
</style>