{% extends "wrapped/1/wrapped_base.html" %}
{% comment %}
COPYRIGHT (C) 2018-2025 BDE ENS Paris-Saclay
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n pretty_money %}
{% block content %}
	<div class="wrap-container">
		<h2>{% trans "NoteKfet Wrapped" %}</h2>
		<h1 id="name">{{ wrapped.note.club.name }}</h1>
		{% trans "Your best consumer:" %}
		<div class="category" id="consumer"></div>
		{% trans "Your worst creditor:" %}
		<div class="category" id="creditor"></div>
		<ul class="list">
			<li>{{ nb_soiree_orga }} {% trans "party·ies organised" %}</li>
			<li>{{ nb_member }} {% trans "distinct members" %}</li>
		</ul>
	</div>
	<script>
		let con = Boolean({{ big_consumer | safe }});
		let cre = Boolean({{ big_creancier | safe }});
		let d1 = document.getElementById("consumer");
		let d2 = document.getElementById("creditor");
		if (con) { d1.textContent = {{ big_consumer | safe }}[0] + " " + gettext("with") + " " + {{ big_consumer | safe}}[1] + "€";}
		else { d1.textContent = gettext("{% trans "Infortunately, you doesn't have consumer this year" %}");};
		if (cre) { d2.textContent = {{ big_creancier | safe}}[0] + " " + gettext("with") + " " + {{ big_creancier | safe}}[1] + "€";}
		else { d2.textContent = gettext("{% trans "Congratulations you are a real rat !" %}"); };

	</script>
{% endblock %}
