{{-- Expects $order with order_status and order_type --}}
@if ($order->order_status->value === 'cancelled')

@lang('modules.order.info_cancelled')

@lang('modules.order.orderCancelledMessage')

@else @php $steps = \App\Enums\OrderStatus::progressStepsFor($order->order_type); $currentStepIndex = \App\Enums\OrderStatus::progressIndex($order->order_status->value, $order->order_type); @endphp
@foreach($steps as $index => $status) @php $stepStatus = \App\Enums\OrderStatus::from($status); $isCompleted = $index < $currentStepIndex; $isCurrent = $index === $currentStepIndex; $isNext = $index === $currentStepIndex + 1; @endphp
!$loop->first && !$loop->last, 'sm:items-start' => $loop->first, 'sm:items-end' => $loop->last, 'w-full sm:w-auto', ])>
progressStepIconClasses($isCompleted, $isCurrent, $isNext), ]) data-status-step="{{ $status }}"> @if($index <= $currentStepIndex) @else {!! $stepStatus->icon() !!} @endif
@if(!$loop->last) @endif
!$loop->first && !$loop->last, 'text-left' => $loop->first || true, 'sm:text-right' => $loop->last, 'pt-1 sm:pt-0', ])>

$index <= $currentStepIndex, 'text-gray-500 dark:text-gray-400' => $index > $currentStepIndex, ])> {{ $stepStatus->translatedLabel() }}

@endforeach
@endif