<?php

use App\Models\CategoryModel;

/**
 * @var CategoryModel $categories
 * @var string $title
 */
?>

<div class="mb-4">
  <a href="<?= url('HOME') ?>
    " class="text-decoration-none">
    <i class="bi bi-arrow-left">
    </i>
    Kembali
  </a>
  <h2 class="fw-bold mt-3">
    Request <?= $title ?>
  </h2>
  <p class="text-muted">
    Pilih kategori yang sesuai dengan kendala yang sedang Anda alami.
  </p>
</div>
<div class="row g-4">
  <?php foreach ($categories as $category): ?>
    <div class="col-lg-4 col-md-6">
      <a href="<?= url('REQUEST_TIKET') . '?kategori=' . $category->getId() ?>"
        class="text-decoration-none text-dark">
        <div class="card border-0 shadow-sm category-card h-100">
          <div class="card-body">
            <div class="d-flex align-items-center">
              <div class="icon-wrapper me-3">

              </div>
              <div>
                <h5 class="mb-1 fw-semibold">
                  <?= $category->getNamaKategori() ?>
                </h5>
                <small class="text-muted">
                  <?= $category->getDeskripsi() ?>
                </small>
              </div>
            </div>
          </div>
        </div>
      </a>
    </div>
  <?php endforeach; ?>
</div>