<?php
 
?>
<?php if (!empty($data['labels'])): ?>
<div class="flex items-center justify-between mb-2">
    <span class="text-xs text-gray-500">Top 10 by video count</span>
    <a href="/admin/categories" class="text-[11px] text-primary-600 hover:text-primary-700 font-medium">View all</a>
</div>
<div style="height: 250px;">
    <canvas id="topCategoriesChart"></canvas>
</div>
<?php else: ?>
<div class="text-center py-8 text-gray-300 text-xs">No categories yet</div>
<?php endif; ?>
