{# match: GameMatch, pronostic: Pronostic|null, partner_pronostics: list, now: DateTimeImmutable, prono_access_blocked: bool|false, joker_usage_by_match_id: array, show_joker_ui: bool|false, team_favorite_highlight: array|null, match_goals: list|null, team_match_points_by_match_id: array #} {% set match_goals = match_goals ?? [] %} {% set prono_access_blocked = prono_access_blocked ?? false %} {% set joker_usage_by_match_id = joker_usage_by_match_id ?? {} %} {% set espion_intel_by_match_id = espion_intel_by_match_id ?? {} %} {% set show_joker_ui = show_joker_ui ?? false %} {% set team_favorite_highlight = team_favorite_highlight ?? null %} {% set is_favorite_country_match = match_is_team_favorite_highlight(match, team_favorite_highlight) %} {% set favorite_country_id = team_favorite_highlight.country_id ?? null %} {% set match_joker = joker_usage_by_match_id[match.id] ?? null %} {% set espion_intel = espion_intel_by_match_id[match.id] ?? null %} {% set is_finished = match_is_finished(match, now) %} {% set is_live = match_is_live(match, now) %} {% set can_edit_before_kickoff = match_can_edit_before_kickoff(match, now) %} {% set can_pronostic = can_edit_before_kickoff and not prono_access_blocked %} {% set match_prono_blocked_cotisation = prono_access_blocked and can_edit_before_kickoff %} {% set can_place_joker = (show_joker_ui|default(false)) and can_edit_before_kickoff %} {% set show_joker_actions = can_place_joker or match_joker %} {% set cotes_visible = match_cotes_visible(match, now) or espion_intel %} {% set team_match_points_by_match_id = team_match_points_by_match_id|default({}) %} {% set team_match_points = team_match_points_by_match_id[match.id] ?? null %}
{% set show_joker_mark = match_joker and match_joker.code|default('') != 'espion' %} {% set show_card_marks = is_favorite_country_match or match.isKdoMatch or show_joker_mark %} {% if show_card_marks %} {% set marks_count = (match.isKdoMatch ? 1 : 0) + (is_favorite_country_match ? 1 : 0) + (show_joker_mark ? 1 : 0) %}
{% if match.isKdoMatch %}
Match KDO
{% endif %} {% if is_favorite_country_match %}
Équipe favorite — {{ team_favorite_highlight.joker_name }}
{% endif %} {% if show_joker_mark %} {% include 'competition/_match_card_joker_badge.html.twig' with { match: match, joker: match_joker, } only %} {% endif %}
{% endif %}
{% if is_finished %} Terminé {% elseif can_pronostic %} À venir {% endif %}
{{ match.paysDomicile ? match.paysDomicile.nom : '-' }} {% include 'components/_country_flag_img.html.twig' with { country: match.paysDomicile } only %}
{% include 'components/_country_flag_img.html.twig' with { country: match.paysExterieur } only %} {{ match.paysExterieur ? match.paysExterieur.nom : '-' }}

{% set group_letter = match.groupStandingLetter %} {% set phase_label = match_phase_label(match) %} {% if group_letter %} {{ phase_label ?: ('Groupe ' ~ group_letter) }} {% elseif phase_label %} {{ phase_label }} {% else %} Phase à définir {% endif %} {% if match.venueName %} · {{ match.venueName }} {% endif %} {% if cotes_visible and not match_cote_is_one_n_two() and match.coteMoyenne is not null %} · Cote moy. {{ match.coteMoyenne|number_format(2, ',', ' ') }} {% endif %}

{% if match_prono_blocked_cotisation %}

Pronostics disponibles après réglage de la cotisation (10 € par joueur).

{% elseif can_pronostic %}
{% set prono_default_home = prono_form_default_score_domicile(match) %} {% set prono_default_away = prono_form_default_score_exterieur(match) %}
{% include 'competition/_match_pronostic_submit_button.html.twig' %} {% if show_joker_actions %} {% include 'competition/_match_card_joker_actions.html.twig' with { match: match, match_joker: match_joker, espion_intel: espion_intel, prono_access_blocked: prono_access_blocked, } only %} {% endif %}
{% elseif is_live %}
{% include 'competition/_match_card_score_inputs.html.twig' with { match: match, live: true } only %} {{ match_live_clock_label(match) }}
{% elseif is_finished %}
{% include 'competition/_match_card_score_inputs.html.twig' with { match: match, live: false } only %}
{% endif %}
{% if show_joker_actions and not can_pronostic %} {% include 'competition/_match_card_joker_actions.html.twig' with { match: match, match_joker: match_joker, espion_intel: espion_intel, prono_access_blocked: prono_access_blocked, } only %} {% endif %} {% if is_live or is_finished %}
{% include 'competition/_match_goals.html.twig' with { goals: match_goals } only %}
{% endif %} {% set show_self_prono_row = app.user and not can_pronostic %} {% set show_team_points_ring = is_finished and team_match_points is not null %} {% set show_prono_line = show_self_prono_row or partner_pronostics is not empty or show_team_points_ring %}
{% if show_self_prono_row %} {% include 'competition/_match_card_self_pronostic_row.html.twig' with { pronostic: pronostic, match: match } only %} {% endif %} {% if partner_pronostics is not empty %} {% for partner_pronostic in partner_pronostics %} {% set partner_user = partner_pronostic.joueur %}
{{ partner_pronostic.scoreDomicile }} - {{ partner_pronostic.scoreExterieur }}
{% endfor %} {% elseif not show_self_prono_row and not show_team_points_ring %} {% endif %} {% if show_team_points_ring %} {% include 'competition/_match_card_team_points_ring.html.twig' with { team_match_points: team_match_points } only %} {% endif %}