@php $locale = $locale ?? app()->getLocale(); // Field-name compatibility (Classic → Golden fallbacks). $eyebrow = $data['eyebrow'][$locale] ?? $data['subheading'][$locale] ?? ''; $heading = $data['heading'][$locale] ?? ''; $description = $data['description'][$locale] ?? ''; $renderedHeading = preg_replace_callback('/__(.+?)__/u', function ($m) { return ''.e($m[1]).''; }, e($heading)); $leftItems = $repeatedContents->slice(0, 3); $rightItems = $repeatedContents->slice(3, 3); // Resolve a triptych blurb's icon, title and text from either Golden or // Classic field names. Classic stores `feature_icon` as an image path; if // only that is present we emit it as , otherwise we emit the FA class. $gdkResolveBlurb = function (array $rc, string $locale): array { $title = $rc['spfeat_title'][$locale] ?? $rc['feature_title'][$locale] ?? ''; $text = $rc['spfeat_text'][$locale] ?? $rc['feature_text'][$locale] ?? ''; $icon = $rc['spfeat_icon_class'] ?? null; $image = null; if (! $icon && ! empty($rc['feature_icon'])) { $candidate = $rc['feature_icon']; if (is_string($candidate) && str_contains($candidate, '/')) { $image = $candidate; } else { $icon = $candidate; } } return [ 'title' => $title, 'text' => $text, 'icon' => $icon ?? 'fa-solid fa-fingerprint', 'image' => $image, ]; }; @endphp
@if($eyebrow)
{{ $eyebrow }}
@endif @if($heading)

{!! $renderedHeading !!}

@endif @if($description)

{!! nl2br(e($description)) !!}

@endif
{{-- Left column --}}
@foreach($leftItems as $repeatedContent) @php $b = $gdkResolveBlurb($repeatedContent->content_data ?? [], $locale); @endphp @if($b['title'] || $b['text'])
@if($b['image']) @else @endif

{{ $b['title'] }}

{!! nl2br(e($b['text'])) !!}

@endif @endforeach
{{-- Centre: illustrative virtual card, with no account or balance data --}} {{-- Right column --}}
@foreach($rightItems as $repeatedContent) @php $b = $gdkResolveBlurb($repeatedContent->content_data ?? [], $locale); @endphp @if($b['title'] || $b['text'])
@if($b['image']) @else @endif

{{ $b['title'] }}

{!! nl2br(e($b['text'])) !!}

@endif @endforeach