code: public function getCurrentItem($menu)
      {
          $rootItem = $this->get($menu);
  
          $currentItem = $this->helper->getCurrentItem($rootItem);
  
          if (null === $currentItem) {
              $currentItem = $rootItem;
          }
  
          return $currentItem;
      }
docs: Returns the current item of a menu.
  
  @param ItemInterface|string $menu
  
  @return ItemInterface