@props(['status', 'type' => 'default'])

@php
    $classes = [
        'en_attente' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-300',
        'validée' => 'bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-300',
        'rejetée' => 'bg-red-100 text-red-800 dark:bg-red-900/20 dark:text-red-300',
        'actif' => 'bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-300',
        'inactif' => 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300',
        'stock_faible' => 'bg-red-100 text-red-800 dark:bg-red-900/20 dark:text-red-300',
        'stock_normal' => 'bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-300',
        'stock_eleve' => 'bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-300',
        'entree' => 'bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-300',
        'sortie' => 'bg-red-100 text-red-800 dark:bg-red-900/20 dark:text-red-300',
        'transfert' => 'bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-300',
        'default' => 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300',
    ];
    
    $class = $classes[$status] ?? $classes['default'];
@endphp

<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium {{ $class }}">
    {{ $slot }}
</span>

