{{-- PRO Profile list card. Mobile: vertical — photo banner top, info below (single column). Desktop: horizontal — photo left (fixed width), info right (2-column grid). Required: $proProfile — App\Models\ProProfile $mainPhoto — App\Models\ProfilePhoto|null Optional: $cardLink — string (defaults to pro.show) --}} @php $name = trim(($proProfile->first_name ?? '') . ' ' . ($proProfile->last_name ?? '')); $cardLink = $cardLink ?? route('pro.show', $proProfile); // Support form categories $catPills = []; $totalCats = 0; if (!empty($proProfile->support_forms)) { foreach (\App\Models\ProProfile::supportFormTaxonomy() as $cat) { $catSlugs = collect($cat['subcats'])->flatMap(fn($s) => array_keys($s['tags']))->all(); if (array_intersect($catSlugs, $proProfile->support_forms)) { $totalCats++; if (count($catPills) < 4) { $catPills[] = ['emoji' => $cat['emoji'], 'label' => $cat['label']]; } } } } // Specific support form tag labels for right column "Ondersteuningsvormen" (max 5) $tagItems = []; $tagExtra = 0; if (!empty($proProfile->support_forms)) { $allTags = collect(\App\Models\ProProfile::supportFormTaxonomy()) ->flatMap(fn($c) => collect($c['subcats'])->flatMap(fn($s) => $s['tags'])) ->all(); foreach (array_slice($proProfile->support_forms, 0, 5) as $slug) { if ($lbl = $allTags[$slug] ?? null) $tagItems[] = __($lbl); } $tagExtra = max(0, count($proProfile->support_forms) - 5); } // Target groups (max 4 to display) $targetBadges = []; if (!empty($proProfile->target_groups)) { $opts = \App\Models\ProProfile::targetGroupOptions(); foreach (array_slice($proProfile->target_groups, 0, 4) as $key) { if ($lbl = $opts[$key] ?? null) $targetBadges[] = __($lbl); } $targetExtra = max(0, count($proProfile->target_groups) - 4); } else { $targetExtra = 0; } // Support for / expertise (max 4) $expertiseBadges = []; if (!empty($proProfile->support_for)) { $opts = \App\Models\ProProfile::supportForOptions(); foreach (array_slice($proProfile->support_for, 0, 4) as $key) { if ($lbl = $opts[$key] ?? null) $expertiseBadges[] = __($lbl); } $expertiseExtra = max(0, count($proProfile->support_for) - 4); } else { $expertiseExtra = 0; } // About me snippet $about = $proProfile->about_me ? \Illuminate\Support\Str::limit(strip_tags($proProfile->about_me), 160) : null; // Mobile right panel: logo takes priority; fall back to a second photo $allPhotos = $proProfile->user->photos ?? collect(); $secondPhoto = $mainPhoto ? $allPhotos->where('id', '!=', $mainPhoto->id)->first() : null; $hasRightPanel = $proProfile->logoUrl() || $secondPhoto; @endphp {{-- Outer makes the entire card a single clickable link --}} {{-- ── Photo + logo column ───────────────────────────────────────── --}} {{-- Mobile: nd-pro-media is flex-row; nd-pro-split constrains photo to square so the right half can show logo/extra-photo. Desktop (sm+): flex-col via Tailwind, photo fills remaining height, logo strip below. --}}
{{-- Photo --}}
@if ($mainPhoto) {{ $name }} @else
@endif
{{-- Right panel — logo (priority) or second photo (fallback), mobile only. On desktop: logo shown as strip below photo; second photo not shown. --}} @if ($proProfile->logoUrl()) @elseif ($secondPhoto) {{-- Second photo: mobile right panel only, hidden on desktop --}}
@endif
{{-- ── Info column ────────────────────────────────────────────────── --}}
{{-- 2-column info grid --}}
{{-- LEFT: naam · praktijk · locatie · kernactiviteit · expertise --}}
{{-- Naam --}}

{{ $name ?: '—' }}

@if ($proProfile->is_neurodivergent) 🧠 {{ __('Neurodivergent') }} @endif
{{-- Praktijk --}} @if ($proProfile->organization_name)

{{ $proProfile->organization_name }}

@endif {{-- ZIP · woonplaats · land --}} @if ($proProfile->zip_code || $proProfile->city || $proProfile->country)

{{ collect([ collect([$proProfile->zip_code, $proProfile->city])->filter()->implode(' '), $proProfile->country ? __(\App\Helpers\CountryHelper::name($proProfile->country)) : null, ])->filter()->implode(' — ') }}

@endif {{-- Kernactiviteit (vrij tekstveld) --}} @if ($proProfile->core_activity)

{{ $proProfile->core_activity }}

@endif {{-- Expertise — diagnoses / conditions --}} @if ($expertiseBadges)

{{ __('Expertise') }}

@foreach ($expertiseBadges as $badge) {{ $badge }} @endforeach @if ($expertiseExtra > 0) +{{ $expertiseExtra }} @endif
@endif
{{-- RIGHT: doelgroep · ondersteuningsvormen (hoofdcategorieën) --}}
@if ($targetBadges)

{{ __('Target group') }}

@foreach ($targetBadges as $badge) {{ $badge }} @endforeach @if ($targetExtra > 0) +{{ $targetExtra }} @endif
@endif @if ($catPills)

{{ __('Forms of support') }}

@foreach ($catPills as $pill) {{ $pill['emoji'] }} {{ __($pill['label']) }} @endforeach @if ($totalCats > 4) +{{ $totalCats - 4 }} @endif
@endif
{{-- About me + booking CTA --}} @if ($about || $proProfile->booking_url)
@if ($about)

{{ $about }}

@endif @if ($proProfile->booking_url) 📅 {{ __('Book a session') }} @endif
@endif