{{-- The badge for one day: the recorded status, or what a day with no record means. --}} @php /** @var \App\Enums\AttendanceStatus|null $status */ /** @var string|null $derived */ [$tone, $label] = match (true) { $status !== null => [$status->tone(), $status->label()], $derived === 'weekend' => ['gray', __('Weekend')], $derived === 'pending' => ['amber', __('Not in yet')], $derived === 'future' => ['gray', '—'], $derived === 'absent' => ['red', __('Absent')], default => ['gray', '—'], }; @endphp {{ $label }}