@props(['status']) @php // Map an order status enum to a soft-fill badge family + public label. // canceled = neutral (a full refund, not an error); red is reserved for // error/simulated which are the only states demanding admin attention. $map = [ 'awaiting' => ['warning', __('Awaiting')], 'pending' => ['warning', __('Pending')], 'processing' => ['info', __('Processing')], 'in_progress' => ['info', __('In progress')], 'active' => ['active', __('Active')], 'completed' => ['success', __('Completed')], 'partial' => ['partial', __('Partial')], 'canceled' => ['danger', __('Canceled')], 'refunded' => ['refund', __('Refunded')], 'error' => ['danger', __('Error')], 'simulated' => ['danger', __('Simulated')], 'fail' => ['danger', __('Fail')], ]; [$tone, $label] = $map[$status] ?? ['neutral', ucfirst(str_replace('_', ' ', (string) $status))]; @endphp {{ $label }}