{% assign omni = false %}
{% assign core = false %}
{% assign log_out = true %}

{% if current_person.signed_in? %}
  {% assign log_out = false %}
  {% for group in current_person.groups %}
	{% if group.name contains 'Partners' %}
	 {% assign partners = true  %}
   {% else %}
    {% if group.name contains 'Core' %}
      {% assign core = true %}
      {% elsif group.name contains 'Omni' %}
        {% assign omni = true %}
    {% endif %}
	{% endif %}
  {% endfor %}
{% endif %}


{% include "header" %}
{% include "course_version_outdated_alert", courses: courses.featured %}
<main class="np-main homepage">
  <div class="hero-homepage">
    <div class="np-max-width">
      {% if core %}
        <div class="hero-text lora">Welcome to Cin7 Core Academy</div>
      {% elsif omni %}
        <div class="hero-text lora">Welcome to Cin7 Omni Academy</div>
      {% elsif log_out or partners %}
        <div class="hero-text lora">Welcome to Cin7 Academy</div>
	    {% else %}
		    <div class="hero-text lora">Welcome to Cin7 Academy</div>
      {% endif %}
	  <div class="hero-subheading">Develop your own expertise with Cin7 products to help your customers grow, automate, and improve their businesses. </div>
    </div>
  </div>

  <div class="page-content">
    <div class="section np-max-width">
      {% if core %}
        <div class="heading lora">Learn Cin7 Core by your function with Learning Paths</div>
        <div class="section-content">
          {% include 'learning_path_carousel_core' %}
        </div>
        <div class="heading lora">Grow and broaden your Cin7 Core expertise with Deep Dives</div>
        <div class="section-content">
          {% include "category_carousel_core"%}
        </div>
          {% elsif omni %}
            <div class="heading lora">New to Cin7 Omni? Start learning here!</div>
            <div class="section-content">
              {% include "category_carousel"%}
            </div>
          {% elsif log_out or partners %}
            <div class="heading lora">Learn Cin7 Core by function with Learning Paths</div>
            <div class="section-content">
              {% include 'learning_path_carousel_core' %}
            </div>
            <div class="heading lora">Grow and broaden your Cin7 Core expertise with Deep Dives</div>
            <div class="section-content">
              {% include "category_carousel_core"%}
            </div>
            <div class="heading lora">Learn Cin7 Omni by module and features</div>
            <div class="section-content">
              {% include "category_carousel"%}
            </div>
      {% endif %}
    </div>
    <div class="section np-max-width">
      <div class="heading lora">Featured Courses: Integrations</div>
      <div class="section-content">
        {% include 'featured_courses' %}
      </div>
      </div>
      <div class="button-wrapper">
        <a class="catalog-btn" href="/app/catalog">Browse All Courses</a>
      </div>
      </div>
      <div class="section section-info">
        <div class="np-max-width info-section-padding">
          {% include 'homepage_testimonials' %}
        </div>
      </div>
  </div>
</main>
{% include "footer" %}
