private function processNavigationItem(NavigationItem $navigationItem): void
    {
        // create label from name when no label is set
        if (!$navigationItem->getLabel()) {
            $navigationItem->setLabel($this->translator->trans($navigationItem->getName(), [], 'admin'));
        }

        // add child routes
        if ($navigationItem->getMainRoute()) {
            $mainPath = $this->routeRegistry->findRouteByName($navigationItem->getMainRoute())->getPath();
            foreach ($this->routeRegistry->getRoutes() as $route) {
                if (false !== strpos($route->getPath(), $mainPath)) {
                    $navigationItem->addChildRoute($route->getName());
                }
            }
        }

        // process all children
        foreach ($navigationItem->getChildren() as $child) {
            $this->processNavigationItem($child);
        }
    }