{{-- Rating Badge Component --}} @props([ 'platform', 'score', 'max' => 10, 'reviews' => null, ]) @php $colors = [ 'TheFork' => 'bg-green-500/20 text-green-100 border-green-500/30', 'Google' => 'bg-blue-500/20 text-blue-100 border-blue-500/30', 'TripAdvisor' => 'bg-emerald-500/20 text-emerald-100 border-emerald-500/30', ]; $colorClass = $colors[$platform] ?? 'bg-umami-text/20 text-gray-100 border-umami-text/30'; $icons = [ 'TheFork' => '', 'Google' => '', 'TripAdvisor' => '', ]; @endphp
merge(['class' => "inline-flex items-center gap-2 px-3 py-2 rounded-full border backdrop-blur-sm $colorClass"]) }}> {{-- Star Icon --}} {{-- Score --}} {{ $score }}/{{ $max }} {{-- Platform Name --}} {{ $platform }} {{-- Reviews Count (optional) --}} @if($reviews) ({{ $reviews }}+) @endif