{%- import "macros/ptcg.html" as ptcg -%}
{% if nth == 1 and config.mode == "serve" %}
<script src="{{ get_url(path='ptcg-icons.js') }}" async></script>
{% endif %}
{%- set card = load_data(path="@/ptcg/cards/" ~ id ~ ".toml") -%}
{% if not display %}<div class="ptcg-card-popover" popover="auto" id="{{ id }}">{% endif %}
	<div class="ptcg-card">
		{{ ptcg::card_pic(id=id) }}
		<div class="card-info">
			{% if card.kind == "pokemon" %}
				{{ ptcg::pokemon_card_info(card=card) }}
			{% elif card.kind == "trainer" %}
				{{ ptcg::trainer_card_info(card=card) }}
			{% elif card.kind == "energy" %}
				{{ ptcg::energy_card_info(card=card) }}
			{% endif %}
		</div>
	</div>
{% if not display %}</div>{% endif %}
