{% load app_tags %}

{% if media.status and user.progress_bar %}
  <div>
    {% if media.status == 'In progress' %}
      {% if media.max_progress and media.max_progress > 0 %}
        {% widthratio media.progress media.max_progress 100 as progress_width %}
        <div class="{{ media.status|status_background_color }} h-[5px]"
             style="width: {{ progress_width }}%"></div>
      {% else %}
        <div class="{{ media.status|status_background_color }} h-[5px] w-full"></div>
      {% endif %}
    {% else %}
      <div class="{{ media.status|status_background_color }} h-[5px] w-full"></div>
    {% endif %}

  </div>
{% endif %}
