{% extends "layouts/base.html" %}

{% block title %}KH3 - Ingredients{% endblock %}

{% block head %}
	<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/kh3/ingredients.css") }}"></link>
	<script
		type="module"
		src="{{ crate::find_hash("/public/scripts/kh3/ingredients.js") }}"
	></script>
{% endblock %}

{% block content %}
	{% for ingredient in ingredients %}
	<div>
		<h1>{{ingredient.name}}</h1>
		<ul>
		{% for location in ingredient.locations %}
			<li class="tooltip-wrapper" {% if location.note.is_some() %}style="cursor: help"{% endif %}>
				{{location.world+}} - {{+location.room}}
				{% match location.note %}
					{% when Some with (val) %}
						<div class="help"></div>
						<div class="tooltip">{{ val }}</div>
					{% when None %}
				{% endmatch %}
			</li>
		{% endfor %}
		</ul>
	</div>
	{% endfor %}
{% endblock %}
