{% assign learning_path_lang = "DE" %}

{% for cat in learning_path.categories %}
	{% if cat.name == "English" %}
		{% assign learning_path_lang = "EN" %}
	{% endif %}
{% endfor %}

<div class="np-card np-no-horizontal-padding card-learning-path" data-lang="{{learning_path_lang}}">
	<div class="np-card-container">
	  <div class="np-learning-path">
		<div class="image-wrapper">
			  <img
				alt="{{ learning_path.name }}"
				class="np-card-image np-learning-path-image"
				src="{{ learning_path.image_url }}"
			/>
				<div class="np-card-ribbon np-hidden-mobile">
					<i class="fa fa-book-open" aria-hidden="true"></i>
					<span data-lang="DE">{{ learning_path.items.count }} Inhalte</span>
					<span data-lang="EN">{{ learning_path.items.count }} Items</span>
				</div>
		</div>

		<div class="np-card-text-wrapper">

			<div class="np-card-content np-card-padding np-card-content-vertical">
				<h3 class="np-card-content-title">
					{{ learning_path.name }}
				</h3>

				 {% include "learning_path_description" %}
				
				{% if learning_path.has_instructors? %}
					<div class="np-card-content-subtitle">
						{{ learning_path.instructor_names }}
					</div>
				{% endif %}

				<div class="np-card-ribbon np-hidden-desktop">
					<i class="fa fa-book-open" aria-hidden="true"></i>
					<span data-lang="DE">{{ learning_path.items.count }} Inhalte</span>
					<span data-lang="EN">{{ learning_path.items.count }} Items</span>
				</div>
				
				<div class="np-card-content-footer">
					<a class="np-button"
						{% if learning_path.enrolled? %}
							href="{% route learning_path, id: learning_path.id %}"
						{% else %}
							href="{% route learning_path_enrollment, code: learning_path.enrollment_code %}"
						{% endif %}
					>
						<span data-lang="DE">Weiter</span>
						<span data-lang="EN">View</span>
					</a>
					{% if learning_path.enrolled? %}
						<div class="np-card-content-progress
						np-button-color">
							<span data-lang="DE">
								{% if learning_path.completed? %}
									Abgeschlossen
								{% elsif learning_path.started? == false %}
									0% abgeschlossen
								{% else %}
									{% t shared.progress, count: learning_path.progress %}
								{% endif %}
							</span>
							<span data-lang="EN">
								{% if learning_path.completed? %}
									Completed
								{% elsif learning_path.started? == false %}
									0% completed
								{% else %}
									{{learning_path.progress}}% cmopleted
								{% endif %}
							</span>					
						</div>
					{% endif %}
				</div>
			</div>
		</div>
	</div>
	</div>
	<div class="np-card-stack">
		<div class="np-card-stack-level-1"></div>
		<div class="np-card-stack-level-2"></div>
	</div>
</div>
