{% macro trash_type(trash_by_type) %}
<div class="masonry-card">
  <div class="card shadow-sm">
    <div class="card-body">
      <div class="d-flex justify-content-between align-items-center mb-3">
        <h5 class="card-title mb-0"><i class="fas fa-file-alt me-2"></i>Trash by Type</h5>
        <a href="{{ url_for('main.trash') }}" class="btn btn-primary btn-sm">View All</a>
      </div>
      {% if trash_by_type %}
      <div class="chart-container">
        <canvas id="trashTypeChart"></canvas>
      </div>
      <div class="mt-3">
        {% for type in trash_by_type %}
        <div class="d-flex justify-content-between align-items-center mb-2">
          <div class="d-flex align-items-center">
            <div class="color-indicator me-2" style="width: 12px; height: 12px; border-radius: 50%; background-color: var(--chart-color-{{ loop.index }})"></div>
            <span class="text-muted">{{ type.extension|upper }}:</span>
          </div>
          <div class="fw-bold text-primary">{{ type.count }}</div>
        </div>
        {% endfor %}
      </div>
      {% else %}
      <div class="text-muted small">No files in trash</div>
      {% endif %}
    </div>
  </div>
</div>
{% endmacro %} 