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

@php
    $classes = match($type) {
        'aman' => 'badge-aman',
        'tersedia' => 'badge-aman',
        'selesai' => 'badge-aman',
        'waspada' => 'badge-waspada',
        'proses' => 'badge-waspada',
        'awas' => 'badge-awas',
        'kritis' => 'badge-kritis',
        'habis' => 'badge-kritis',
        'dibatalkan' => 'badge-kritis',
        'danger' => 'badge-kritis',
        'terkirim' => 'badge-aman',
        'dokter' => 'badge-waspada',
        'apoteker' => 'badge-aman',
        default => 'bg-gray-100 text-gray-700',
    };
@endphp

<span {{ $attributes->merge(['class' => 'inline-flex items-center px-3 py-1 rounded-full text-sm font-medium ' . $classes]) }}>
    {{ $slot }}
</span>
