{% load i18n %}
{% load time_tags %}

{% if offer %}


  <div class="l-checkout__support">
    {% if link %}
      <a href="{% url 'funding_current' offer.slug %}">
        <span class="buttonlike">{% trans "Wesprzyj!" %}</span>
        <div class="funding-bar-container">
    {% endif %}
    <div class="l-checkout__support__bar">
      <span class="{% if percentage < 15 %}little-progress{% endif %}" data-label="{% if sum %}{% trans "zebrane" %}: {{ sum }} zł{% endif %}" style="width: {{ percentage|stringformat:'.2f' }}%;"></span>
    </div>
    <div class="l-checkout__support__footer">
      {% if show_title %}
        <p>
          {% if show_title_calling %}
            <strong style="margin-right: .6em;">{% trans "Pomóż uwolnić książkę!" %}</strong>
          {% endif %}
          {{ offer }}
      {% endif %}
      {% if is_current %}
        <p>
          {% trans "do końca zbiórki" %}:
          <strong class="countdown inline" data-until='{{ offer.end|date_to_utc:True|utc_for_js }}'></strong>
        </p>
      {% endif %}
      {% if not is_win %}
        <p>
          {% trans "potrzebujemy" %}: <strong>{{ offer.target }} zł</strong>
        </p>
      {% endif %}
    </div>
    {% if link %}
        </div>
      </a>
    {% endif %}
  </div>

{% endif %}
