@props(['category', 'level' => 0, 'expandedSlugs' => []]) @php $isActive = request('category') == $category->slug; $hasChildren = $category->children->isNotEmpty(); // Check if any child is active to keep parent expanded $isOpen = in_array($category->slug, $expandedSlugs); @endphp