@props(['type' => 'info', 'dismissible' => true, 'icon' => null]) @php $styles = [ 'info' => [ 'bg' => 'bg-blue-50', 'border' => 'border-blue-200', 'text' => 'text-blue-800', 'icon' => $icon ?? 'fa-solid fa-info-circle', 'icon_color' => 'text-blue-600', ], 'success' => [ 'bg' => 'bg-green-50', 'border' => 'border-green-200', 'text' => 'text-green-800', 'icon' => $icon ?? 'fa-solid fa-check-circle', 'icon_color' => 'text-green-600', ], 'warning' => [ 'bg' => 'bg-amber-50', 'border' => 'border-amber-200', 'text' => 'text-amber-800', 'icon' => $icon ?? 'fa-solid fa-exclamation-triangle', 'icon_color' => 'text-amber-600', ], 'error' => [ 'bg' => 'bg-red-50', 'border' => 'border-red-200', 'text' => 'text-red-800', 'icon' => $icon ?? 'fa-solid fa-exclamation-circle', 'icon_color' => 'text-red-600', ], ]; $style = $styles[$type] ?? $styles['info']; @endphp
merge(['class' => "{$style['bg']} {$style['border']} border rounded-2xl p-5 flex items-start gap-4"]) }} @if($dismissible) x-data="{ show: true }" x-show="show" @endif>
{{ $slot }}
@if($dismissible) @endif