<?php

declare(strict_types=1);

/*
 * This file is part of alox bundle for Contao.
 *
 * (c) Benjamin Roth
 *
 * @license commercial
 */

namespace vossmedien\AloxBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

class Configuration implements ConfigurationInterface
{
    public function getConfigTreeBuilder(): TreeBuilder
    {
        $treeBuilder = new TreeBuilder('vossmedien_alox');
        $treeBuilder
            ->getRootNode()
            ->children()
                ->arrayNode('zvoove')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('api_key')
                            ->info('Your zvoove API key.')
                        ->end()
                        ->scalarNode('api_domain')
                            ->info('Your zvoove API domain.')
                        ->end()
                    ->end()
                ->end()
            ->end()
        ;

        return $treeBuilder;
    }
}