@props([ 'current' => 1, 'steps' => [ 1 => ['name' => 'Data Perusahaan', 'icon' => 'fa-building'], 2 => ['name' => 'Data Keuangan', 'icon' => 'fa-chart-line'], 3 => ['name' => 'Hasil Analisis', 'icon' => 'fa-check-circle'] ], 'completed' => [] ])
@foreach($steps as $step => $info) @php $isCompleted = in_array($step, $completed) || $step < $current; $isCurrent = $step == $current; $isPending = $step > $current; @endphp
@if(!$loop->last)
@endif
$isCurrent, 'step-circle-completed' => $isCompleted, 'step-circle-inactive' => $isPending, 'border-primary-500 bg-primary-500 text-white' => $isCurrent, 'border-green-500 bg-green-500 text-white' => $isCompleted, 'border-gray-300 bg-white dark:bg-gray-800 text-gray-500' => $isPending, ])> @if($isCompleted) @else {{ $step }} @endif
$isCurrent, 'text-green-600 dark:text-green-400' => $isCompleted, 'text-gray-500 dark:text-gray-400' => $isPending, ])> {{ $info['name'] }}
@if($info['description'] ?? false) @endif
@endforeach
Langkah {{ $current }}: {{ $steps[$current]['description'] ?? $steps[$current]['name'] }}
@push('styles') @endpush