<?php
/**
 * Breadcrumb de navegación
 *
 * @var AdminDashboardRenderer $this
 * @var string $activeComponent ID del componente activo
 * @var array<string, array<string, mixed>> $groups Grupos de componentes
 * @var array<string, array<string, string>> $components Componentes disponibles
 * @var array<string, mixed>|null $group Grupo del componente activo
 * @var array<string, string>|null $component Datos del componente activo
 */

declare(strict_types=1);

if (!defined('ABSPATH')) {
    exit;
}
?>

<nav class="roi-breadcrumb mb-4" aria-label="<?php echo esc_attr__('Navegación', 'roi-theme'); ?>">
    <div class="d-flex align-items-center flex-wrap gap-2">
        <!-- Botón Volver -->
        <button type="button" class="roi-back-to-home btn btn-sm btn-outline-secondary">
            <i class="bi bi-arrow-left me-1"></i>
            <?php echo esc_html__('Volver', 'roi-theme'); ?>
        </button>

        <!-- Separador -->
        <span class="roi-breadcrumb__separator text-muted">/</span>

        <!-- Grupo -->
        <?php if ($group): ?>
            <span class="roi-breadcrumb__group">
                <i class="bi <?php echo esc_attr($group['icon']); ?> me-1" style="color: <?php echo esc_attr($group['color']); ?>;"></i>
                <?php echo esc_html($group['label']); ?>
            </span>
            <span class="roi-breadcrumb__separator text-muted">/</span>
        <?php endif; ?>

        <!-- Componente actual -->
        <?php if ($component): ?>
            <span class="roi-breadcrumb__current fw-semibold" aria-current="page" style="color: #FF8600;">
                <i class="bi <?php echo esc_attr($component['icon']); ?> me-1"></i>
                <?php echo esc_html($component['label']); ?>
            </span>
        <?php endif; ?>
    </div>
</nav>
