@php $type = null; $message = null; if (session('success')) { $type = 'success'; $message = session('success'); } elseif (session('error')) { $type = 'error'; $message = session('error'); } elseif (session('warning')) { $type = 'warning'; $message = session('warning'); } elseif (session('info')) { $type = 'info'; $message = session('info'); } $config = match($type) { 'success' => [ 'border' => 'border-emerald-200', 'icon_bg' => 'bg-emerald-50', 'icon_color' => 'text-emerald-600', 'title' => 'text-surface-900', 'msg' => 'text-emerald-700', ], 'error' => [ 'border' => 'border-red-200', 'icon_bg' => 'bg-red-50', 'icon_color' => 'text-red-600', 'title' => 'text-surface-900', 'msg' => 'text-red-700', ], 'warning' => [ 'border' => 'border-amber-200', 'icon_bg' => 'bg-amber-50', 'icon_color' => 'text-amber-600', 'title' => 'text-surface-900', 'msg' => 'text-amber-700', ], 'info' => [ 'border' => 'border-blue-200', 'icon_bg' => 'bg-blue-50', 'icon_color' => 'text-blue-600', 'title' => 'text-surface-900', 'msg' => 'text-blue-700', ], default => null, }; @endphp