<?php

/**
 * Generic KPI tile row. Renders a responsive grid of {@see appTile()} entries.
 * Empty array short-circuits without emitting any markup.
 *
 * @var array<int, array<string, mixed>> $kpiTiles
 */

$kpiTiles = is_array($kpiTiles ?? null) ? $kpiTiles : [];
if ($kpiTiles === []) {
  return;
}
?>
<div class="app-tiles">
  <?php foreach ($kpiTiles as $tile): ?>
    <?php if (is_array($tile)) { appTile($tile); } ?>
  <?php endforeach; ?>
</div>
<hr>
