{{-- Institutional CCHP header: top utility strip + sticky logo/nav/search --}} @php $lc = ['locale' => app()->getLocale()]; $routeName = Route::currentRouteName(); $contactUrl = route('site.contact', $lc); $accountRequestsUrl = (($accountBadgeCount ?? 0) > 0 && ($customerNotificationsUrl ?? null)) ? $customerNotificationsUrl : route('site.account.requests', array_merge($lc, ['tab' => 'requests'])); $trackUrl = route('site.repair-tracking.index', $lc); $authUser = auth()->user(); $accountAvatarUrl = $authUser ? (\App\Support\UserAvatar::url($authUser->avatar) ?: \App\Support\UserAvatar::fallbackUrl((int) $authUser->id)) : null; $accountInitial = mb_substr((string) ($authUser?->name ?: $authUser?->mobile ?: '?'), 0, 1); $navProductsActive = site_nav_products_active(); $phone = $headerPhone ?? null; $phoneHref = $headerPhoneHref ?? null; $email = trim((string) ($headerContact?->email ?? '')); $hasCategories = site_feature_enabled('categories') && isset($headerCategories) && $headerCategories->isNotEmpty(); $hasNews = site_feature_enabled('news'); $hasActivities = site_feature_enabled('activities'); $hasBlog = site_feature_enabled('articles_blog'); $showsProducts = site_shows_products(); $showsServices = site_shows_services(); $showsTracking = site_shows_tracking(); $menu = $cchpHeaderMenu ?? [ 'industry' => [], 'specialty' => [], 'catalog' => [], 'featuredId' => null, 'market' => null, 'association' => ['topics' => [], 'pages' => []], 'newsCategories' => [], 'activityCategories' => [], 'news' => [], 'newsPreview' => [], 'newsActions' => [], 'articles' => [], 'newsIndexUrl' => route('site.news.index', $lc), 'activitiesIndexUrl' => route('site.activities.index', $lc), 'aboutUrl' => route('site.about', $lc), 'faqUrl' => route('site.faq', $lc), 'blogIndexUrl' => route('site.blog.index', $lc), 'itemsIndexUrl' => route('site.items.index', $lc), 'industriesIndexUrl' => route('site.industries.index', $lc), ]; $routeCategory = request()->route('category'); $currentCategoryId = $routeCategory instanceof \App\Models\Category ? (int) $routeCategory->id : (int) request()->integer('category_id'); $marketIds = $menu['market']['descendantIds'] ?? []; $navMarketActive = $currentCategoryId > 0 && in_array($currentCategoryId, $marketIds, true); $navCategoriesActive = site_nav_categories_active() && ! $navMarketActive; $navActivitiesActive = request()->routeIs('site.activities.*'); $navAssociationActive = request()->routeIs('site.about', 'site.contact', 'site.faq'); $categoryColumns = [ ['heading' => __('site.mega_industry_areas'), 'items' => $menu['industry']], ['heading' => __('site.mega_special_topics'), 'items' => $menu['specialty']], ]; @endphp