@section('header_title', 'Call History')

Recent Calls

Review your video and voice call history.

Total Calls

{{ $calls->total() }}

@if($calls->count() > 0)
@foreach($calls as $call) @php $isCaller = $call->caller_id == auth()->id(); $otherUser = $isCaller ? $call->receiver : $call->caller; $statusConfig = [ 'ended' => ['color' => 'text-green-500', 'bg' => 'bg-green-500/10', 'label' => 'Completed'], 'missed' => ['color' => 'text-red-500', 'bg' => 'bg-red-500/10', 'label' => 'Missed'], 'rejected' => ['color' => 'text-red-500', 'bg' => 'bg-red-500/10', 'label' => 'Declined'], 'active' => ['color' => 'text-blue-500', 'bg' => 'bg-blue-500/10', 'label' => 'In Progress'], 'ringing' => ['color' => 'text-yellow-500', 'bg' => 'bg-yellow-500/10', 'label' => 'Ringing'], ]; $status = $statusConfig[$call->status] ?? ['color' => 'text-gray-500', 'bg' => 'bg-white/5', 'label' => ucfirst($call->status)]; $iconOutgoing = 'M12 19l9 2-9-18-9 18 9-2zm0 0v-8'; $iconIncoming = 'M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z'; $callIcon = $isCaller ? $iconOutgoing : $iconIncoming; @endphp

{{ $otherUser->name }}

{{ $isCaller ? 'Outgoing' : 'Incoming' }} • {{ $call->created_at->format('M j, g:i A') }}
@if($call->status == 'ended' && $call->started_at && $call->ended_at) @endif
{{ $status['label'] }}
@endforeach
@if($calls->hasPages())
{{ $calls->links() }}
@endif @else

No Calls Yet

Your call history is empty. Start a video or voice call with one of your matches to see it here.

@endif