{% from 'common/macros.html' import format_size %}

{% macro storage_overview(room_count, file_count, folder_count, total_size) %}
<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-database me-2"></i>Room Storage</h5>
        <a href="{{ url_for('rooms.rooms') }}" class="btn btn-primary btn-sm">View All</a>
      </div>
      <div class="d-flex flex-column">
        <div class="d-flex justify-content-between align-items-center mb-3">
          <div class="d-flex align-items-center">
            <i class="fas fa-door-open me-2 icon-primary"></i>
            <span class="text-muted">Rooms:</span>
          </div>
          <div class="fw-bold text-primary">{{ room_count }}</div>
        </div>
        <div class="d-flex justify-content-between align-items-center mb-3">
          <div class="d-flex align-items-center">
            <i class="fas fa-file me-2 icon-primary"></i>
            <span class="text-muted">Files:</span>
          </div>
          <div class="fw-bold text-primary">{{ file_count }}</div>
        </div>
        <div class="d-flex justify-content-between align-items-center mb-3">
          <div class="d-flex align-items-center">
            <i class="fas fa-folder me-2 icon-primary"></i>
            <span class="text-muted">Folders:</span>
          </div>
          <div class="fw-bold text-primary">{{ folder_count }}</div>
        </div>
        <div class="d-flex justify-content-between align-items-center">
          <div class="d-flex align-items-center">
            <i class="fas fa-hdd me-2 icon-primary"></i>
            <span class="text-muted">Total Size:</span>
          </div>
          <div class="fw-bold text-primary">{{ format_size(total_size) }}</div>
        </div>
      </div>
    </div>
  </div>
</div>
{% endmacro %} 