<?php /** @var array $list */ ?>
<?php if (empty($list)): ?>
  <div class="p-6 text-center text-bone/40 text-sm"><?= e(t('hub.customers.no_results')) ?></div>
<?php else: ?>
  <ul class="divide-y divide-white/5">
    <?php foreach ($list as $c): ?>
      <li class="p-4 hover:bg-white/5 cursor-pointer"
          hx-get="<?= url('/hub/customers/' . e($c['id'])) ?>"
          hx-target="body" hx-push-url="true">
        <div class="font-medium"><?= e(trim(($c['first_name'] ?? '') . ' ' . ($c['last_name'] ?? ''))) ?></div>
        <div class="text-xs text-bone/50"><?= e($c['email'] ?? '') ?> · <?= e($c['phone'] ?? '') ?></div>
      </li>
    <?php endforeach; ?>
  </ul>
<?php endif; ?>
