@php $pathname = '/'.ltrim(request()->path(), '/'); $isHome = $pathname === '/'; $topBarGlass = 'border-b border-border/80 bg-background/80 shadow-sm backdrop-blur-xl supports-[backdrop-filter]:bg-background/72'; $navItems = [ ['route' => 'app.home', 'label' => 'Home', 'icon' => 'home', 'active' => $pathname === '/'], ['route' => 'app.groups', 'label' => 'Groups', 'icon' => 'users', 'active' => $pathname === '/groups' || str_starts_with($pathname, '/group/')], ['route' => 'app.shared-lists.intro', 'label' => 'Shared lists', 'icon' => 'shopping-cart', 'active' => str_starts_with($pathname, '/shared-lists')], ['route' => 'app.shared-purchases.intro', 'label' => 'Shared purchases', 'icon' => 'package', 'active' => str_starts_with($pathname, '/shared-purchases')], ['route' => 'app.activity', 'label' => 'Notifications', 'icon' => 'bell', 'active' => $pathname === '/activity'], ['route' => 'app.insights', 'label' => 'Insights', 'icon' => 'bar-chart-3', 'active' => $pathname === '/insights'], ['route' => 'app.account', 'label' => 'Profile', 'icon' => 'user', 'active' => $pathname === '/account'], ]; if (request()->user()?->isSuperAdmin()) { array_splice($navItems, 6, 0, [[ 'route' => 'admin.dashboard', 'label' => 'Admin', 'icon' => 'shield-check', 'active' => str_starts_with($pathname, '/admin'), ]]); } @endphp