
{% assign architect_certification_course_image = 'https://s3.amazonaws.com/static.northpass.com/Crayon+Academy/course+images/ArchitectBadge-512x566.png' %}
{% assign activator_certification_course_image = 'https://s3.amazonaws.com/static.northpass.com/Crayon+Academy/course+images/AcademyBadge-Activator.png' %}
{% assign accelerator_certification_course_image = 'https://s3.amazonaws.com/static.northpass.com/Crayon+Academy/course+images/AcceleratorBadge-512x566.png' %}

{% assign is_architect_certification_course_image = false %}
{% assign is_activator_certification_course_image = false %}
{% assign is_accelerator_certification_course_image = false %}

  {% if course.name == 'Architect Certification Course' %}
      {% assign is_architect_certification_course_image = true %}
      {% elsif course.name == 'Activator Certification Course' %}
      {% assign is_activator_certification_course_image = true %}
      {% elsif course.name == 'Accelerator Certification Course' %}
      {% assign is_accelerator_certification_course_image = true %}
  {%endif%}


<div class="np-card">
  <div class="np-card-container">
    {% if course.ribbon %}
      <div class="np-card-ribbon">
        {{ course.ribbon }}
      </div>
    {% endif %}
      {% if is_architect_certification_course_image == true %}
        <img
          class="np-card-image"
          alt="{{ course.name }}"
          src="{{ architect_certification_course_image  }}"
        >
        {% elsif is_activator_certification_course_image == true %}
        <img
          class="np-card-image"
          alt="{{ course.name }}"
          src="{{ activator_certification_course_image }}"
        >
        {% elsif is_accelerator_certification_course_image == true  %}
        <img
          class="np-card-image"
          alt="{{ course.name }}"
          src="{{ accelerator_certification_course_image }}"
        >
          {% else %}
          <img
            class="np-card-image"
            alt="{{ course.name }}"
            src="{{ course.image_url }}"
          >
      {%endif%}
    <div class="np-card-content np-card-content-vertical np-card-padding">
      <h3 class="np-card-content-title custom-course-description">
        {% if is_architect_certification_course_image == true %}
          Learn how to drive adoption <br> of competitive intelligence
          {% elsif is_activator_certification_course_image == true %}
          Learn how to gather & <br>distribute competitive intelligence
          {% elsif is_accelerator_certification_course_image == true %}
            Learn how to analyze
            competitive intelligence
            {%else%} 
            {{course.name}}
        {% endif %}
      </h3>
      <div class="np-card-content-subtitle">
        {{ course.instructor_names }}
      </div>
      <div class='course-button-container'>
        {% capture course_path %}{% route course, id: course.id %}{% endcapture %}
        {% if is_architect_certification_course_image == true  %}
          <a class="np-button np-button-wide np-course-card-button orange-btn " href="{{ course_path }}">
            {% if course.progress == 0 %}
              BEGIN COURSE
              {% elsif course.progress > 0 and course.progress < 100%}
                RESUME COURSE
                {% elsif course.progress == 100 %}
                  RETAKE COURSE
            {% endif %}
          </a>
          {% elsif is_activator_certification_course_image == true %}
          <a class="np-button np-button-wide np-course-card-button purple-btn" href="{{ course_path }}">
            {% if course.progress == 0 %}
              BEGIN COURSE
              {% elsif course.progress > 0 and course.progress < 100%}
                RESUME COURSE
                {% elsif course.progress == 100 %}
                  RETAKE COURSE
            {% endif %}
          </a>
        {% elsif is_accelerator_certification_course_image == true %}
          <a class="np-button np-button-wide np-course-card-button red-btn" href="{{ course_path }}">
            {% if course.progress == 0 %}
              BEGIN COURSE
              {% elsif course.progress > 0 and course.progress < 100%}
                RESUME COURSE
                {% elsif course.progress == 100 %}
                  RETAKE COURSE
            {% endif %}
          </a>  
        {% endif %}
      </div>
      <div class="np-card-content-footer">
 


        {%- comment -%} {% if course.name == 'Accelerator Certification Course' %}
          <a class="np-button np-button-wide np-course-card-button"
            {% if course.enrolled? %}
              href="#" style="pointer-events: none; color: #486776; background: #F2F4F5"
            {% else %}
              href="{% route course_enrollment, code: course.enrollment_code %}"
            {% endif %}
          >
            {% if course.enrolled? == false %}
              Pre-Register
            {% else %}
              Coming Soon
            {% endif %}
          </a>
        {% else %}
          <a class="np-button np-button-wide np-course-card-button" href="{{ course_path }}">
            {% t shared.view %}
          </a>
        {% endif %} {%- endcomment -%}
      </div>
    </div>
  </div>
</div>

<style>
  .np-card-container {
    background: none;
    box-shadow: none;
 }
</style>