protected function registerConfigItems(ParentItem $root, $parentId, $configItems)
    {
        foreach ($configItems as $configId => $configItem) {
            $subItems = reset($configItem);
            $path = $parentId . '/' . $configId;
            $configPath = str_replace("admin/server/config/",'', $path);
            $translationKey = 'expansion_config.menu.' . implode('.', explode('/', $configPath)) . '.label';

            if (is_array($subItems)) {
                $root->addChild(
                    ParentItem::class,
                    $path,
                    $translationKey,
                    null
                );

                $this->registerConfigItems($root, $path, $configItem);
            } else {
                $root->addChild(
                    ChatCommandItem::class,
                    $path,
                    $translationKey,
                    'admin_config', // Default config on each element.
                    ['cmd' => '/admin config "' . $configPath . '"']
                );
            }
        }
    }