{% extends "base.html" %}

{% block content %}
<h1>Packages</h1>
<p>Printers with drivers assigned — ready for deployment package export.</p>

{% if printers %}
  <figure>
    <table role="grid">
      <thead>
        <tr>
          <th scope="col">Printer</th>
          <th scope="col">Client</th>
          <th scope="col">Driver</th>
          <th scope="col">Downloads</th>
        </tr>
      </thead>
      <tbody>
        {% for printer in printers %}
          <tr>
            <td><a href="/printers/{{ printer.id }}">{{ printer.name }}</a></td>
            <td>{% if printer.client_id %}{{ printer.client.name }}{% else %}—{% endif %}</td>
            <td>{{ printer.driver.original_filename }}</td>
            <td>
              <a href="/printers/{{ printer.id }}/packages/intunewin">.intunewin</a>
              &nbsp;|&nbsp;
              <a href="/printers/{{ printer.id }}/packages/ninja">NinjaRMM ZIP</a>
            </td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
  </figure>
{% else %}
  <p class="empty-state">No package-ready printers yet. Assign a driver to a printer to enable package export.</p>
{% endif %}
{% endblock %}
