<?php require __DIR__ . '/../../layouts/header.php'; $page_title = trans('reviewers'); ?>

<h3 class="mb-3"><i class="fa-solid fa-user-check me-2"></i><?= e(trans('reviewers')) ?></h3>

<div class="card shadow-sm border-0">
  <div class="card-body">
    <div class="table-responsive">
      <table class="table table-hover align-middle mb-0">
        <thead>
          <tr>
            <th>#</th><th>Name</th><th>Email</th><th>Lang</th><th>Date</th>
          </tr>
        </thead>
        <tbody>
          <?php foreach (($rows ?? []) as $r): ?>
            <tr>
              <td><?= e((string)$r['id']) ?></td>
              <td><?= e(trim((string)($r['first_name'] ?? '').' '.(string)($r['last_name'] ?? ''))) ?></td>
              <td><?= e((string)($r['email'] ?? '')) ?></td>
              <td><span class="badge bg-secondary"><?= e((string)($r['preferred_lang'] ?? '')) ?></span></td>
              <td class="text-muted small"><?= e((string)($r['created_at'] ?? '')) ?></td>
            </tr>
          <?php endforeach; ?>
          <?php if (empty($rows ?? [])): ?>
            <tr><td colspan="5" class="text-center text-muted py-4"><?= e(trans('no_data')) ?></td></tr>
          <?php endif; ?>
        </tbody>
      </table>
    </div>
  </div>
</div>

<?php require __DIR__ . '/../../layouts/footer.php'; ?>
