@props([
    'title' => 'Needs attention',
    'items' => [],       // array of strings or ['label'=>..]
    'variant' => 'warning',
    'icon' => 'alert-outline',
])

@php
    $items = collect($items)->map(fn ($i) => is_array($i) ? ($i['label'] ?? '') : $i)->filter()->values();
@endphp

@if($items->isNotEmpty())
    <div {{ $attributes->merge(['class' => "alert alert-$variant py-2 px-3 mb-0"]) }} role="alert">
        <div class="d-flex align-items-center gap-2 fw-semibold small mb-1">
            <span class="mdi mdi-{{ $icon }}" aria-hidden="true"></span>
            {{ $title }}
        </div>
        <ul class="mb-0 ps-4 small">
            @foreach($items as $item)
                <li>{{ $item }}</li>
            @endforeach
        </ul>
    </div>
@endif
