@php $megaNavData = $megaNavData ?? []; $navLabel = $navLabel ?? static function (string $key, string $fallback): string { $translated = __("messages.nav.{$key}"); return $translated === "messages.nav.{$key}" ? $fallback : $translated; }; $serviceGroups = $megaNavData['serviceGroups'] ?? []; $servicesIndexHref = $megaNavData['servicesIndexHref'] ?? '/services'; $industrySections = $megaNavData['industrySections'] ?? []; $industriesIndexHref = $megaNavData['industriesIndexHref'] ?? ($industrySections[0]['href'] ?? '/services'); $portfolioIndexHref = $megaNavData['portfolioIndexHref'] ?? '/portfolio'; $staticLinks = $megaNavData['staticLinks'] ?? []; $cta = $megaNavData['cta'] ?? (config('dynamic-nav.cta') ?? ['label' => 'Get a quote', 'href' => '/contact']); $languages = $megaNavData['languages'] ?? []; $currentLocale = app()->getLocale(); $activeLang = collect($languages)->firstWhere('locale', $currentLocale) ?? $languages[0] ?? null; $featuredProject = $megaNavData['featuredProject'] ?? null; $otherProjects = $megaNavData['otherProjects'] ?? []; $portfolioMobileProjects = $featuredProject ? array_merge([array_merge($featuredProject, ['is_featured' => true])], array_slice($otherProjects, 0, 4)) : array_slice($otherProjects, 0, 5); $logoHref = $logoHref ?? config('dynamic-nav-megamenu.parent_href', '/'); $iconPath = asset('images/criazo-icon.svg'); $wordmarkPath = asset('images/criazo-wordmark.svg'); @endphp