{{-- 处理进度时间线组件 --}}
<div class="card bg-base-100 shadow-xl">
    <div class="card-body">
        <h2 class="card-title">
            <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
            </svg>
            处理进度
        </h2>
        
        <div class="divider my-2"></div>
        
        <ul class="steps steps-vertical w-full">
            <li class="step step-primary">
                <div class="text-left w-full">
                    <div class="font-semibold">上传完成</div>
                    <div class="text-xs opacity-70">{{ \Carbon\Carbon::parse($recordData['created_at'])->format('m-d H:i') }}</div>
                    <div class="text-sm mt-1">{{ $recordType === 'ocr' ? '图片已上传' : '试卷已创建' }}</div>
                </div>
            </li>

            @if($recordData['status'] === 'completed')
                <li class="step step-primary">
                    <div class="text-left w-full">
                        <div class="font-semibold">{{ $recordType === 'ocr' ? 'OCR识别完成' : '试卷已完成' }}</div>
                        <div class="text-xs opacity-70">
                            @if(isset($recordData['processed_at']) && $recordData['processed_at'])
                                {{ \Carbon\Carbon::parse($recordData['processed_at'])->format('m-d H:i') }}
                            @else
                                {{ \Carbon\Carbon::parse($recordData['created_at'])->format('m-d H:i') }}
                            @endif
                        </div>
                        <div class="text-sm mt-1">
                            @if($recordType === 'ocr')
                                识别出 {{ $recordData['total_questions'] ?? 0 }} 道题目
                                @if(isset($recordData['confidence_avg']) && $recordData['confidence_avg'])
                                    <span class="badge badge-success badge-sm ml-2">
                                        准确率: {{ number_format(($recordData['confidence_avg'] ?? 0) * 100, 1) }}%
                                    </span>
                                @endif
                            @else
                                包含 {{ $recordData['total_questions'] ?? 0 }} 道题目
                            @endif
                        </div>
                    </div>
                </li>
            @elseif($recordData['status'] === 'processing')
                <li class="step step-info">
                    <div class="text-left w-full">
                        <div class="font-semibold flex items-center gap-2">
                            <span class="loading loading-spinner loading-sm"></span>
                            处理中...
                        </div>
                        <div class="text-sm mt-1 opacity-70">正在识别题目和答案</div>
                    </div>
                </li>
            @endif
        </ul>
    </div>
</div>
