{% extends "base.html" %}
{% block content %}
<h1>Drivers</h1>

<section>
  <h2>Upload Driver Package</h2>
  <form
    hx-post="/drivers/upload"
    hx-encoding="multipart/form-data"
    hx-target="#driver-list"
    hx-swap="outerHTML"
    hx-indicator="#upload-spinner"
  >
    <label for="driver-file">Driver Package (ZIP containing .inf + driver files)</label>
    <input type="file" id="driver-file" name="file" accept=".zip" required>
    <button type="submit">Upload</button>
    <span id="upload-spinner" class="htmx-indicator" aria-busy="true">Uploading...</span>
  </form>
</section>

<section>
  <h2>Driver Library</h2>
  {% include "partials/driver_list.html" %}
</section>
{% endblock %}
