@props(['status' => '', 'type' => 'default']) @php $statusConfig = [ 'shipment' => [ 'booked' => ['bg-info-subtle text-info', 'bi-box-arrow-in-right'], 'in_transit' => ['bg-primary-subtle text-primary', 'bi-truck'], 'arrived' => ['bg-warning-subtle text-warning', 'bi-geo-alt'], 'cleared' => ['bg-success-subtle text-success', 'bi-check-circle'], 'delivered' => ['bg-success text-white', 'bi-check-all'], 'on_hold' => ['bg-danger-subtle text-danger', 'bi-pause-circle'], 'cancelled' => ['bg-secondary-subtle text-secondary', 'bi-x-circle'], 'pending' => ['bg-warning-subtle text-warning', 'bi-clock'], ], 'order' => [ 'draft' => ['bg-secondary-subtle text-secondary', 'bi-file-earmark'], 'confirmed' => ['bg-info-subtle text-info', 'bi-check2-circle'], 'processing' => ['bg-primary-subtle text-primary', 'bi-gear'], 'completed' => ['bg-success text-white', 'bi-check-all'], 'cancelled' => ['bg-danger-subtle text-danger', 'bi-x-circle'], 'pending' => ['bg-warning-subtle text-warning', 'bi-clock'], ], 'invoice' => [ 'draft' => ['bg-secondary-subtle text-secondary', 'bi-file-earmark'], 'sent' => ['bg-info-subtle text-info', 'bi-envelope-check'], 'paid' => ['bg-success text-white', 'bi-check-circle'], 'overdue' => ['bg-danger-subtle text-danger', 'bi-exclamation-triangle'], 'partial' => ['bg-warning-subtle text-warning', 'bi-hourglass-split'], 'cancelled' => ['bg-secondary-subtle text-secondary', 'bi-x-circle'], ], 'default' => [ 'active' => ['bg-success-subtle text-success', 'bi-check-circle'], 'inactive' => ['bg-secondary-subtle text-secondary', 'bi-x-circle'], 'pending' => ['bg-warning-subtle text-warning', 'bi-clock'], 'approved' => ['bg-success text-white', 'bi-check-all'], 'rejected' => ['bg-danger-subtle text-danger', 'bi-x-lg'], ], ]; $typeConfig = $statusConfig[$type] ?? $statusConfig['default']; $normalizedStatus = strtolower(str_replace(' ', '_', $status)); $config = $typeConfig[$normalizedStatus] ?? ['bg-secondary-subtle text-secondary', 'bi-circle']; @endphp {{ ucfirst(str_replace('_', ' ', $status)) }}