@props(['prediction']) @if ($prediction) @php $action = $prediction['action'] ?? 'no_signal'; $headline = match ($action) { 'fill_now' => 'Fill up now', 'wait' => 'Wait', default => 'No signal', }; $score = (float) ($prediction['confidence_score'] ?? 0); $circumference = 125.6; // 2π × 20 $offset = round($circumference * (1 - $score / 100), 1); $label = $prediction['confidence_label'] ?? 'low'; $labelColour = match ($label) { 'high' => 'bg-green-100 text-green-700', 'medium' => 'bg-amber-100 text-amber-700', default => 'bg-zinc-100 text-zinc-500', }; @endphp

Recommendation

{{ $headline }}

{{ (int) $score }}%
Confidence

{{ $prediction['reasoning'] ?? '' }}

{{ ucfirst($label) }} confidence
@endif