{% load static i18n %}
{% load course_flow_templatetags %}
<div data-component="sidebar"></div>

{% comment %} TODO: Also remove the accompanying CSS styles when purging this {% endcomment %}
{% comment %} <div class="left-panel collapsed hide-print">

  <div class="left-panel-toggle hover-shade">
    <span id="left-panel-collapse" class="material-symbols-rounded">
            menu_open
    </span>
    <span id="left-panel-expand" class="material-symbols-rounded">
      menu
    </span>
  </div>

  <img class="title-image" src="{% static 'course_flow/img/logo-courseflow.svg' %}"/>
  <a id="panel-home" class="panel-item hover-shade no-underline" href="{% url 'course_flow:home' %}">
    <span class="material-symbols-rounded">home</span>
    <div>{% trans 'Home' %}</div>
  </a>

  {% if user|has_group:"Teacher" %}
    <a id="panel-my-library" class="panel-item hover-shade no-underline" href="{% url 'course_flow:my-library' %}">
      <span class="material-symbols-rounded">collections_bookmark</span>
      <div>{% trans 'My library' %}</div>
    </a>
    <a id="panel-explore" class="panel-item hover-shade no-underline" href="{% url 'course_flow:explore' %}">
      <span class="material-symbols-rounded">manage_search</span>
      <div>{% trans 'Explore' %}</div>
    </a>
  {% endif %}

  {% if not user.is_anonymous %}
  // @todo brought in from master 07a520dc3835879daaa179d34835172c136a3421
  {% if user|get_classrooms|length > 0 %}

    <a id="panel-my-live-projects" class="panel-item hover-shade no-underline"
       href="{% url 'course_flow:my-live-projects' %}">
      <span class="material-symbols-rounded">calendar_month</span>
      <div>{% trans 'My classrooms' %}</div>
    </a>
  {% endif %}
  {% endif %}

  {% if user|has_group:"Teacher" %}
    <hr>
  {% endif %}

  <div class="left-panel-extra">
    {% if user|has_group:"Teacher" %}
      <a id="my-favourites" class="panel-item hover-shade no-underline" href="{% url 'course_flow:my-favourites' %}">
        <span class="material-symbols-rounded">star</span>
        <div>{% trans 'My favourites' %}</div>
      </a>
      {% for favourite in user.favourite_set.all|not_deleted_favourites|slice:":5" %}
        <a title="{{ favourite.content_object | safe }}" class="panel-favourite hover-shade"
          {% if favourite.content_object.type == "project" %}
           id="project{{ favourite.object_id }}"
           href="{% url 'course_flow:project-update' pk=favourite.content_object.pk %}"
          {% else %}
           id="workflow{{ favourite.object_id }}"
           href="{% url 'course_flow:workflow-update' pk=favourite.content_object.pk %}"
          {% endif %}
        >
          {{ favourite.content_object | safe }}
        </a>
      {% endfor %}
      <a class="panel-favourite hover-shade collapsed-text-show-more"
         href="{% url 'course_flow:my-favourites' %}">{% trans 'See all' %}</a>
    {% endif %}
  </div>

  <a id="user-feedback" target="_blank" class="panel-item hover-shade no-underline"
     href="https://courseflow.freshdesk.com/support/home">
    <span class="green filled material-symbols-rounded">help</span>
    <div>
      {% trans "Help and support" %}
    </div>
  </a>
</div> {% endcomment %}
