@php $serviceGroups = $megaNavData['serviceGroups'] ?? []; $industrySections = $megaNavData['industrySections'] ?? []; $featuredProject = $megaNavData['featuredProject'] ?? null; $otherProjects = $megaNavData['otherProjects'] ?? []; $portfolioIndexHref = $megaNavData['portfolioIndexHref'] ?? '/portfolio'; $servicesIndexHref = $megaNavData['servicesIndexHref'] ?? ($serviceGroups[0]['href'] ?? '/services'); $industriesIndexHref = $megaNavData['industriesIndexHref'] ?? ($industrySections[0]['href'] ?? '/services'); $portfolioFeatured = $featuredProject ? array_merge($featuredProject, ['is_featured' => true]) : null; $portfolioBento = array_slice($otherProjects, 0, $portfolioFeatured ? 4 : 5); $navLabel = static function (string $key, string $fallback): string { $translated = __("messages.nav.{$key}"); return $translated === "messages.nav.{$key}" ? $fallback : $translated; }; @endphp