{{ $train->train_number }}
{{ $train->status === 'Submitted' ? 'Submitted · locked' : 'Draft · editing allowed' }}{{ $train->coachInspections->count() }} actual coaches · {{ $inspectedCount }} inspected · {{ $pendingCount }} pending
@if($train->status !== 'Submitted')
@endif
{{ $train->status === 'Submitted' ? 'View report' : ($train->is_composition_confirmed ? 'Open coaches' : 'Confirm coaches') }}
@foreach([
['label' => 'Coaches', 'value' => $train->coachInspections->count(), 'tone' => 'text-slate-950'],
['label' => 'Inspected', 'value' => $inspectedCount, 'tone' => 'text-slate-950'],
['label' => 'Passed', 'value' => $passedCount, 'tone' => 'text-emerald-800'],
['label' => 'Failed', 'value' => $failedCount, 'tone' => 'text-red-800'],
['label' => 'Pending', 'value' => $pendingCount, 'tone' => 'text-slate-600'],
['label' => 'Unavailable', 'value' => $removedCount, 'tone' => 'text-slate-500'],
] as $metric)
{{ $metric['label'] }}
{{ $metric['value'] }}
@endforeach