@props([ 'toasts' => [], ]) @php $normalizedToasts = collect($toasts) ->filter(fn ($toast) => filled($toast['message'] ?? null) || filled($toast['title'] ?? null)) ->map(function ($toast) { $type = $toast['type'] ?? 'info'; return [ 'type' => in_array($type, ['success', 'error', 'warning', 'info'], true) ? $type : 'info', 'title' => $toast['title'] ?? null, 'message' => $toast['message'] ?? null, 'duration' => $toast['duration'] ?? 5200, ]; }); @endphp