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

<h3 class="mb-3"><i class="fa-solid fa-people-group me-2"></i><?= e(trans('committees')) ?></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>Conference</th><th>Type</th><th>Name</th><th>Email</th><th>Date</th>
          </tr>
        </thead>
        <tbody>
          <?php foreach (($rows ?? []) as $r): ?>
            <tr>
              <td><?= e((string)$r['id']) ?></td>
              <td><?= e((string)($r['conference_id'] ?? '')) ?></td>
              <td><?= e((string)($r['committee_type'] ?? '')) ?></td>
              <td><?= e((string)($r['full_name'] ?? '')) ?></td>
              <td><?= e((string)($r['email'] ?? '')) ?></td>
              <td class="text-muted small"><?= e((string)($r['created_at'] ?? '')) ?></td>
            </tr>
          <?php endforeach; ?>
          <?php if (empty($rows ?? [])): ?>
            <tr><td colspan="6" 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'; ?>
