<div class="pl-2.5 mb-7 text-md grow">
    <div class="flex flex-col">
        <div class="text-sm text-gray-800">
            {{ $status->name . ' ' . $status->description }}
        </div>
        <span class="text-xs text-gray-600">
            @if (strtolower($status->name) == 'order')
                {{ $permohonan->created_at }}
            @elseif (strtolower($status->name) == strtolower($permohonan->status))
                {{ $permohonan->updated_at }}
            @endif
        </span>
    </div>

    @php
        $isCurrentStatus = strtolower($status->name) == strtolower($permohonan->status);
        $hasKeterangan = isset($permohonan->keterangan);
    @endphp

    {{-- Tampilkan keterangan jika status 'register' --}}
    @if (strtolower($status->name) == 'register' && $hasKeterangan && $isCurrentStatus)
        <div class="card border border-agi-100 shadow-none">
            <div class="card-body">
                <p class="text-xs text-gray-800 leading-[22px]">
                    {{ $permohonan->keterangan }}
                </p>
            </div>
        </div>
    @endif

    {{-- Tampilkan dokumen dan keterangan jika status 'revisi' --}}
    @if (strtolower($status->name) == 'revisi' && $hasKeterangan)
        <div class="card border border-agi-100 shadow-none">
            <div class="card-body">
                <a href="{{ route('activity.download', $permohonan->id) }}" class="badge badge-sm badge-outline">
                    {{ basename($permohonan->dokumen) }}
                    <i class="ki-filled ki-cloud-download"></i>
                </a>
                <p class="text-xs text-gray-800 leading-[22px]">
                    {{ $permohonan->keterangan }}
                </p>
            </div>
        </div>
    @endif

    @if (strtolower($status->name) == 'assign' && $isCurrentStatus)
        <div class="card border border-agi-100 shadow-none">
            <div class="card-body grid grid-cols-3 gap-5">

                <div>
                    <h3 class="text-md font-medium text-gray-900">Catatan:</h3>
                    <span class="text-2sm text-gray-700">{{ $permohonan->penilaian->keterangan }}</span>
                </div>
            </div>
        </div>
    @endif
</div>
