@php
$data = $resume->data ?? [];
$info = $data['personal_information'] ?? [];
$contact = $data['contact_details'] ?? [];
$profileImage = $info['profile_image'] ?? ($resume->user->avatar_url ?? '');
$order = $data['section_order'] ?? [];
$visibility = $data['section_visibility'] ?? [];
$labels = [
'professional_summary' => 'Professional Summary',
'objective' => 'Objective / Career Goal',
'work_experience' => 'Work Experience',
'education_history' => 'Education History',
'skills' => 'Skills',
'languages' => 'Languages',
'projects' => 'Projects',
'certifications' => 'Certifications',
'awards_honors' => 'Awards & Honors',
'volunteer_experience' => 'Volunteer Experience',
'hobbies_interests' => 'Hobbies & Interests',
'references' => 'References',
'publications_research' => 'Publications / Research',
'professional_links' => 'Professional Links',
];
@endphp
@if(!empty($profileImage))

@endif
{{ $info['full_name'] ?? $resume->user->name }}
{{ $contact['email'] ?? $resume->user->email }}
@if(!empty($contact['phone'])) | {{ $contact['phone'] }} @endif
@foreach($order as $key)
@continue(!isset($labels[$key]))
@continue(in_array($key, \App\Services\ResumeService::OPTIONAL_SECTIONS, true) && !($visibility[$key] ?? false))
{{ $labels[$key] }}
@include('resumes.partials.section-content', ['data' => $data, 'key' => $key])
@endforeach