@php
$statuses = [
'draft' => ['label' => __('Draft'), 'color' => 'secondary', 'icon' => 'bx-file-blank'],
'pending' => ['label' => __('Pending'), 'color' => 'warning', 'icon' => 'bx-time'],
'confirmed' => ['label' => __('Confirmed'), 'color' => 'info', 'icon' => 'bx-check'],
'processing' => ['label' => __('Processing'), 'color' => 'primary', 'icon' => 'bx-loader'],
'shipped' => ['label' => __('Shipped'), 'color' => 'info', 'icon' => 'bx-package'],
'delivered' => ['label' => __('Delivered'), 'color' => 'success', 'icon' => 'bx-check-double'],
'completed' => ['label' => __('Completed'), 'color' => 'success', 'icon' => 'bx-check-circle'],
'cancelled' => ['label' => __('Cancelled'), 'color' => 'danger', 'icon' => 'bx-x-circle'],
];
@endphp
@foreach($statuses as $key => $status)
@php
$count = ($salesByStatus[$key] ?? 0) + ($purchaseByStatus[$key] ?? 0);
@endphp
@if($count > 0)
{{ $status['label'] }}
{{ $count }}
@endif
@endforeach
@if(array_sum($salesByStatus) + array_sum($purchaseByStatus) === 0)
{{ __('No orders yet') }}
@endif