<?php
/**
 * SalonPro X - Badge Component
 * Usage: <?php component('badge', ['text' => 'Active', 'type' => 'success']); ?>
 * @var string $text Badge text
 * @var string $type Bootstrap color: success, danger, warning, info, secondary (default: secondary)
 * @var string $class Additional classes
 * @var string $size sm, lg (optional)
 */
$text = $text ?? '';
$type = $type ?? 'secondary';
$class = $class ?? '';
$size = $size ?? '';
$sizeClass = $size === 'sm' ? 'badge-sm' : ($size === 'lg' ? 'badge-lg' : '');
?>
<span class="badge bg-<?= e($type) ?> <?= e($sizeClass) ?> <?= e($class) ?>"><?= e($text) ?></span>
