{% extends "base.html" %}

{% block content %}
<h1>Dashboard</h1>

<div class="quick-actions">
  <a href="/printers" class="btn-action">New Printer</a>
  <a href="/drivers" class="btn-action">Upload Driver</a>
  <a href="/packages" class="btn-action">Export Package</a>
</div>

<section class="recent-activity">
  <h2>Recent Activity</h2>

  <div class="activity-section">
    <h3>Recent Printers</h3>
    {% if recent_printers %}
      <ul>
        {% for printer in recent_printers %}
          <li><a href="/printers/{{ printer.id }}">{{ printer.name }}</a> — {{ printer.ip_address }}</li>
        {% endfor %}
      </ul>
    {% else %}
      <p class="empty-state">No printers configured yet.</p>
    {% endif %}
  </div>

  <div class="activity-section">
    <h3>Recent Packages</h3>
    {% if recent_packages %}
      <ul>
        {% for package in recent_packages %}
          <li><a href="/printers/{{ package.id }}">{{ package.name }}</a>{% if package.client_id %} — {{ package.client.name }}{% endif %}</li>
        {% endfor %}
      </ul>
    {% else %}
      <p class="empty-state">No packages exported yet.</p>
    {% endif %}
  </div>
</section>
{% endblock %}
