{#
  /**
 * @file
 * Default theme implementation to display a node.
 *
 * @ingroup themeable
 */
#}
{{ attach_library('dchadwick/predict_fight') }}
{% set fighter_1 = node.field_fighter_one.entity %}
{% set fighter_2 = node.field_fighter_two.entity %}
{% set fighter1img = file_url(fighter_1.field_player_photo.entity.field_media_image.entity.uri.value) %}
{% set fighter2img = file_url(fighter_2.field_player_photo.entity.field_media_image.entity.uri.value) %}

<article{{ attributes }} id="fight" data-fight="{{ node.id }}">
  <div{{ content_attributes }}>
    <table class="table" id="compare-fighters">
      <thead>
        <th></th>
        <th><a href="/node/{{ fighter_1.id }}">{{ node.field_fighter_one.entity.getTitle() }}<br/><img src="{{ fighter1img }}"/></a></th>
        <th><a href="/node/{{ fighter_2.id }}">{{ node.field_fighter_two.entity.getTitle() }}<br/><img src="{{ fighter2img }}"/></a></th>
      </thead>
      <tbody>
        <tr>
          <td>Record</td>
          <td>{{ fighter_1.field_wins.value }} - {{ fighter_1.field_losses.value }} - {{ fighter_1.field_ties.value }}</td>
          <td>{{ fighter_2.field_wins.value }} - {{ fighter_2.field_losses.value }} - {{ fighter_2.field_ties.value }}</td>
        </tr>
        <tr>
          <td>Age</td>
          <td>{{ fighter_1.field_age.value }}</td>
          <td>{{ fighter_2.field_age.value }}</td>
        </tr>
        <tr>
          <td>Height</td>
          <td>{{ fighter_1.field_height.value }}</td>
          <td>{{ fighter_2.field_height.value }}</td>
        </tr>
        <tr>
          <td>Reach</td>
          <td>{{ fighter_1.field_reach.value }}</td>
          <td>{{ fighter_2.field_reach.value }}</td>
        </tr>
        <tr>
          <td>Leg Reach</td>
          <td>{{ fighter_1.field_leg_reach.value }}</td>
          <td>{{ fighter_2.field_leg_reach.value }}</td>
        </tr>
        <tr>
          <td>Knockouts</td>
          <td>{{ fighter_1.field_knockouts.value }}</td>
          <td>{{ fighter_2.field_knockouts.value }}</td>
        </tr>
        <tr>
          <td>Striking Accuracy</td>
          <td>{{ fighter_1.field_striking_accuracy.value }}</td>
          <td>{{ fighter_2.field_striking_accuracy.value }}</td>
        </tr>
        <tr>
          <td>Strikes Per Min.</td>
          <td>{{ fighter_1.field_strikes_per_minute.value }}</td>
          <td>{{ fighter_2.field_strikes_per_minute.value }}</td>
        </tr>
        <tr>
          <td>Sig Strike Defense</td>
          <td>{{ fighter_1.field_sig_strike_defense.value }}</td>
          <td>{{ fighter_2.field_sig_strike_defense.value }}</td>
        </tr>
        <tr>
          <td>Absorbed per min.</td>
          <td>{{ fighter_1.field_absorbed_per_min.value }}</td>
          <td>{{ fighter_2.field_absorbed_per_min.value }}</td>
        </tr>
        <tr>
          <td>Standing Strikes</td>
          <td>{{ fighter_1.field_standing_strikes.value }}</td>
          <td>{{ fighter_2.field_standing_strikes.value }}</td>
        </tr>
        <tr>
          <td>Clinch Strikes</td>
          <td>{{ fighter_1.field_clinch_strikes.value }}</td>
          <td>{{ fighter_2.field_clinch_strikes.value }}</td>
        </tr>
        <tr>
          <td>Ground Strikes</td>
          <td>{{ fighter_1.field_ground_strikes.value }}</td>
          <td>{{ fighter_2.field_ground_strikes.value }}</td>
        </tr>
        <tr>
          <td>Grappling Accuracy</td>
          <td>{{ fighter_1.field_grappling_accuracy.value }}</td>
          <td>{{ fighter_2.field_grappling_accuracy.value }}</td>
        </tr>
        <tr>
          <td>Strikes to Head</td>
          <td>{{ fighter_1.field_strikes_to_head.value }}</td>
          <td>{{ fighter_2.field_strikes_to_head.value }}</td>
        </tr>
        <tr>
          <td>Strikes to Body</td>
          <td>{{ fighter_1.field_strikes_to_body.value }}</td>
          <td>{{ fighter_2.field_strikes_to_body.value }}</td>
        </tr>
        <tr>
          <td>Strikes to Leg</td>
          <td>{{ fighter_1.field_strikes_to_leg.value }}</td>
          <td>{{ fighter_2.field_strikes_to_leg.value }}</td>
        </tr>
        <tr>
          <td>Knockdown Ratio</td>
          <td>{{ fighter_1.field_knockdown_ratio.value }}</td>
          <td>{{ fighter_2.field_knockdown_ratio.value }}</td>
        </tr>
        <tr>
          <td>Takedowns per 15</td>
          <td>{{ fighter_1.field_takedowns_per_15.value }}</td>
          <td>{{ fighter_2.field_takedowns_per_15.value }}</td>
        </tr>
        <tr>
          <td>Takedown Defense</td>
          <td>{{ fighter_1.field_takedown_defense.value }}</td>
          <td>{{ fighter_2.field_takedown_defense.value }}</td>
        </tr>
        <tr>
          <td>Average Fight Time</td>
          <td>{{ fighter_1.field_average_fight_time.value }}</td>
          <td>{{ fighter_2.field_average_fight_time.value }}</td>
        </tr>
        <tr>
          <td>First Round Finishes</td>
          <td>{{ fighter_1.field_first_round_finishes.value }}</td>
          <td>{{ fighter_2.field_first_round_finishes.value }}</td>
        </tr>
      </tbody>

    </table>
  </div>
</article>
