{# Reusable accordion snippet to display transformed ballots (ABIF text). Expects the following variables to be set by the includer: - transformed_abif: string with ABIF contents - conversion_meta: dict with keys like 'original_ballot_type', 'method', 'parameters', 'target_type' - method_label: short label of the method context (e.g., 'IRV/RCV', 'Condorcet/Copeland') - target_type: optional override for the target ballot type label (defaults sensibly to 'ranked') #} {% set _source_type = (conversion_meta.original_ballot_type if conversion_meta else None) or 'unknown' %} {% set _target_type = target_type or (conversion_meta.target_type if conversion_meta and conversion_meta.target_type else 'ranked') %} {% set _method = (conversion_meta.method if conversion_meta else None) %} {% if transformed_abif %}
See transformed ballots

Note: For {{ method_label }}, these {{ _target_type }} ballots are inferred from {{ _source_type }} ballots.

{% if _method %}

Conversion method: {{ _method }}

{% endif %}
{{ transformed_abif }}
{% endif %}