<!DOCTYPE html>
<html lang="en">
<head>
    <title>{{ player_name }}&apos;s Tracker</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles/minecraftTracker.css') }}"/>
    <script type="application/ecmascript" src="{{ url_for('static', filename='assets/minecraftTracker.js') }}"></script>
    <link rel="stylesheet" media="screen" href="https://fontlibrary.org//face/minecraftia" type="text/css"/>
</head>

<body>
    {# TODO: Replace this with a proper wrapper for each tracker when developing TrackerAPI. #}
    <div style="margin-bottom: 0.5rem">
        <a href="{{ url_for("get_generic_game_tracker", tracker=room.tracker, tracked_team=team, tracked_player=player) }}">Switch To Generic Tracker</a>
    </div>

    <div id="player-tracker-wrapper" data-tracker="{{ room.tracker|suuid }}">
        <table id="inventory-table">
            <tr>
                <td><img src="{{ tools_url }}" class="{{ 'acquired' }}" title="Progressive Tools" /></td>
                <td><img src="{{ weapons_url }}" class="{{ 'acquired' }}" title="Progressive Weapons" /></td>
                <td><img src="{{ armor_url }}" class="{{ 'acquired' }}" title="Progressive Armor" /></td>
                <td><img src="{{ resource_crafting_url }}" class="{{ 'acquired' if 'Progressive Resource Crafting' in acquired_items }}"
                    title="Progressive Resource Crafting" /></td>
                <td><img src="{{ icons['Brewing Stand'] }}" class="{{ 'acquired' if 'Brewing' in acquired_items }}" title="Brewing" /></td>
                <td>
                    <div class="counted-item">
                        <img src="{{ icons['Ender Pearl'] }}" class="{{ 'acquired' if '3 Ender Pearls' in acquired_items }}" title="Ender Pearls" />
                        <div class="item-count">{{ pearls_count }}</div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><img src="{{ icons['Bucket'] }}" class="{{ 'acquired' if 'Bucket' in acquired_items }}" title="Bucket" /></td>
                <td><img src="{{ icons['Bow'] }}" class="{{ 'acquired' if 'Archery' in acquired_items }}" title="Archery" /></td>
                <td><img src="{{ icons['Shield'] }}" class="{{ 'acquired' if 'Shield' in acquired_items }}" title="Shield" /></td>
                <td><img src="{{ icons['Red Bed'] }}" class="{{ 'acquired' if 'Bed' in acquired_items }}" title="Bed" /></td>
                <td><img src="{{ icons['Water Bottle'] }}" class="{{ 'acquired' if 'Bottles' in acquired_items }}" title="Bottles" /></td>
                <td>
                    <div class="counted-item">
                        <img src="{{ icons['Netherite Scrap'] }}" class="{{ 'acquired' if '8 Netherite Scrap' in acquired_items }}" title="Netherite Scrap" />
                        <div class="item-count">{{ scrap_count }}</div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><img src="{{ icons['Flint and Steel'] }}" class="{{ 'acquired' if 'Flint and Steel' in acquired_items }}" title="Flint and Steel" /></td>
                <td><img src="{{ icons['Enchanting Table'] }}" class="{{ 'acquired' if 'Enchanting' in acquired_items }}" title="Enchanting" /></td>
                <td><img src="{{ icons['Fishing Rod'] }}" class="{{ 'acquired' if 'Fishing Rod' in acquired_items }}" title="Fishing Rod" /></td>
                <td><img src="{{ icons['Campfire'] }}" class="{{ 'acquired' if 'Campfire' in acquired_items }}" title="Campfire" /></td>
                <td><img src="{{ icons['Spyglass'] }}" class="{{ 'acquired' if 'Spyglass' in acquired_items }}" title="Spyglass" /></td>
                <td>
                    <div class="counted-item">
                        <img src="{{ icons['Dragon Egg Shard'] }}" class="{{ 'acquired' if 'Dragon Egg Shard' in acquired_items }}" title="Dragon Egg Shard" />
                        <div class="item-count">{{ shard_count }}</div>
                    </div>
                </td>
            </tr>
             <tr>
                <td><img src="{{ icons['Lead'] }}" class="{{ 'acquired' if 'Lead' in acquired_items }}" title="Lead" /></td>
                <td><img src="{{ icons['Saddle'] }}" class="{{ 'acquired' if 'Saddle' in acquired_items }}" title="Saddle" /></td>
                <td><img src="{{ icons['Channeling Book'] }}" class="{{ 'acquired' if 'Channeling Book' in acquired_items }}" title="Channeling Book" /></td>
                <td><img src="{{ icons['Silk Touch Book'] }}" class="{{ 'acquired' if 'Silk Touch Book' in acquired_items }}" title="Silk Touch Book" /></td>
                <td><img src="{{ icons['Piercing IV Book'] }}" class="{{ 'acquired' if 'Piercing IV Book' in acquired_items }}" title="Piercing IV Book" /></td>
            </tr>
        </table>
        <table id="location-table">
            {% for area in checks_done %}
            <tr class="location-category" id="{{area}}-header">
                <td>{{ area }} {{'▼' if area != 'Total'}}</td>
                <td class="counter">{{ checks_done[area] }} / {{ checks_in_area[area] }}</td>
            </tr>
            <tbody class="locations hide" id="{{area}}">
                {% for location in location_info[area] %}
                <tr>
                    <td class="location-name">{{ location }}</td>
                    <td class="counter">{{ '✔' if location_info[area][location] else '' }}</td>
                </tr>
                {% endfor %}
            </tbody>
            {% endfor %}
        </table>
    </div>
</body>
</html>
