{% extends "base.html" %}

{% block title %}Statystyki{% endblock %}

{% block content %}
<select onchange="location = this.value;">
    <option disabled selected>Wybierz zawodnika</option>
    <option value="{{ url_for('compare', player='Leo Messi') }}">Leo Messi</option>
    <option value="{{ url_for('compare', player='Cristiano Ronaldo') }}">Cristiano Ronaldo</option>
    <option value="{{ url_for('compare', player='Kylian Mbappé') }}">Kylian Mbappé</option>
    <option value="{{ url_for('compare', player='Zlatan Ibrahimović') }}">Zlatan Ibrahimović</option>
    <option value="{{ url_for('compare', player='Luis Suárez') }}">Luis Suárez</option>
    <option value="{{ url_for('compare', player='Erling Haaland') }}">Erling Haaland</option>
    <option value="{{ url_for('compare', player='Karim Benzema') }}">Karim Benzema</option>
    <option value="{{ url_for('compare', player='Sergio Agüero') }}">Sergio Agüero</option>
</select>

{%for player in player2 %}
{% if player.name == selected_player %}
<section class="section-stats">
    <h1>Robert Lewandowski VS {{selected_player}}</h1>
<h2>Gole</h2>
<div class="stats">
    <div class="stat-box">
		<h3>{{ all_time_stats.goals }}</h3>

	</div>
    <div class="stat-box">
        <h3>{{ player.goals}}</h3>

	</div>
    </div>


<h2>Asysty</h2>
<div class="stats">
    <div class="stat-box">
		<h3>{{ all_time_stats.assists }}</h3>

	</div>
    <div class="stat-box">
        <h3>{{ player.assists}}</h3>

	</div>
    </div>

    <h2>Wystąpienia</h2>
<div class="stats">
    <div class="stat-box">
		<h3>{{ all_time_stats.matches }}</h3>

	</div>
    <div class="stat-box">
        <h3>{{ player.assists}}</h3>

	</div>
    </div>

</section>
{% endif %}
{% endfor%}

{% endblock %}