<div class="max-w-lg mx-auto">
  <h2 class="mb-6"><%= title %>.</h2>
  <div class="card">
    <form action="<%= item ? `/angkatan/${item.id}?_method=PUT` : '/angkatan' %>" method="POST" class="space-y-4">
      <div>
        <label class="label">Nomor Angkatan</label>
        <input type="number" name="nomor" required class="input" value="<%= item ? item.nomor : '' %>" />
      </div>
      <div>
        <label class="label">Tahun</label>
        <input type="number" name="tahun" required class="input" value="<%= item ? item.tahun : new Date().getFullYear() %>" />
      </div>
      <div>
        <label class="label">Status</label>
        <select name="status" class="input">
          <option value="aktif" <%= item && item.status === 'aktif' ? 'selected' : '' %>>Aktif</option>
          <option value="arsip" <%= item && item.status === 'arsip' ? 'selected' : '' %>>Arsip</option>
        </select>
      </div>
      <div class="flex gap-2 pt-2">
        <button class="btn-primary btn-sm"><%= item ? 'Simpan' : 'Tambah' %></button>
        <a href="/angkatan" class="btn-secondary btn-sm">Batal</a>
      </div>
    </form>
  </div>
</div>
