src/CliMenu.php
public function getSelectedItem() : MenuItemInterface
    {
        if (null === $this->selectedItem) {
            throw new \RuntimeException('No selected item');
        }

        $item = $this->items[$this->selectedItem];
        return $item instanceof SplitItem
            ? $item->getSelectedItem()
            : $item;
    }
public function getSelectedItem() : MenuItemInterface
    {
        if (null === $this->selectedItem) {
            throw new \RuntimeException('No selected item');
        }

        $item = $this->items[$this->selectedItem];
        return $item instanceof SplitItem
            ? $item->getSelectedItem()
            : $item;
    }
Retrieve the item the user actually selected