@php
$locale = app()->getLocale();
$categoryQuery = filled($categoryId ?? null) ? ['category_id' => $categoryId] : [];
$hasAny = ($relatedProducts ?? collect())->isNotEmpty()
|| ($relatedServices ?? collect())->isNotEmpty()
|| ($relatedArticles ?? collect())->isNotEmpty();
@endphp
@if ($hasAny)
@if (filled($categoryId ?? null))
@endif
@if (($relatedProducts ?? collect())->isNotEmpty())
@foreach ($relatedProducts as $item)
@endforeach
@endif
@if (($relatedServices ?? collect())->isNotEmpty())
@foreach ($relatedServices as $item)
@endforeach
@endif
@if (($relatedArticles ?? collect())->isNotEmpty())
@foreach ($relatedArticles as $item)
@endforeach
@endif
@endif