{{-- Contract workflow (spec §99): done / current / upcoming, with text + icon, never colour alone. --}}
@foreach (($getState() ?? []) as $index => $step) @php $styles = match ($step['state']) { 'done' => 'background:var(--success-50);color:var(--success-700);border-color:var(--success-300);', 'current' => 'background:var(--primary-50);color:var(--primary-700);border-color:var(--primary-400);font-weight:600;', default => 'background:transparent;color:var(--gray-500);border-color:var(--gray-300);', }; $icon = match ($step['state']) { 'done' => 'heroicon-m-check-circle', 'current' => 'heroicon-m-arrow-right-circle', default => 'heroicon-o-ellipsis-horizontal-circle', }; @endphp @if ($index > 0) @endif {{ $step['label'] }} @endforeach