@props(['status']) @php $status = strtolower(str_replace(['_', '-'], ' ', (string) $status)); $class = match(true) { in_array($status, ['confirmed', 'guaranteed', 'checked in', 'active', 'paid', 'completed', 'clean', 'inspected', 'available']) => 'hp-badge-success', in_array($status, ['tentative', 'pending', 'partially paid', 'dirty', 'cleaning in progress', 'reserved', 'issued']) => 'hp-badge-warning', in_array($status, ['cancelled', 'no show', 'inactive', 'blocked', 'out of service', 'under maintenance', 'suspended', 'failed', 'overdue']) => 'hp-badge-danger', in_array($status, ['checked out', 'closed', 'open', 'in progress', 'on hold']) => 'hp-badge-info', in_array($status, ['occupied']) => 'hp-badge-primary', default => 'hp-badge-secondary', }; @endphp merge(['class' => "hp-badge {$class}"]) }}>{{ $status }}