{% extends 'base.html' %}
{% import 'macro/form.html' as form %}

{% block title %} - Individual Minifigures{% endblock %}

{% block main %}
<div class="container-fluid">
  <div class="row mb-3">
    <div class="col-12">
      <div class="d-flex justify-content-between align-items-center">
        <h2><i class="ri-user-line"></i> Individual Minifigures</h2>
        <a href="{{ url_for('add.add') }}" class="btn btn-primary">
          <i class="ri-add-line"></i> Add Minifigures
        </a>
      </div>
    </div>
  </div>

  {% if minifigures | length %}
  <div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4 g-4">
    {% for item in minifigures %}
      <div class="col">
        {% include 'individual_minifigure/card.html' with context %}
      </div>
    {% endfor %}
  </div>
  {% else %}
  <div class="row">
    <div class="col-12">
      <div class="alert alert-info" role="alert">
        <i class="ri-information-line"></i> No individual minifigures found.
        <a href="{{ url_for('add.add') }}" class="alert-link">Add some minifigures</a> to get started!
      </div>
    </div>
  </div>
  {% endif %}
</div>
{% endblock %}
