<?php

namespace Symfony\Config;

use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;

/**
 * This class is automatically generated to help in creating a config.
 */
class NucleosDompdfConfig implements \Symfony\Component\Config\Builder\ConfigBuilderInterface
{
    private $defaults;
    private $_usedProperties = [];
    private $_hasDeprecatedCalls = false;

    /**
     * @return $this
     * @deprecated since Symfony 7.4
     */
    public function defaults(string $name, mixed $value): static
    {
        $this->_hasDeprecatedCalls = true;
        $this->_usedProperties['defaults'] = true;
        $this->defaults[$name] = $value;

        return $this;
    }

    public function getExtensionAlias(): string
    {
        return 'nucleos_dompdf';
    }

    public function __construct(array $config = [])
    {
        if (array_key_exists('defaults', $config)) {
            $this->_usedProperties['defaults'] = true;
            $this->defaults = $config['defaults'];
            unset($config['defaults']);
        }

        if ($config) {
            throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config)));
        }
    }

    public function toArray(): array
    {
        $output = [];
        if (isset($this->_usedProperties['defaults'])) {
            $output['defaults'] = $this->defaults;
        }
        if ($this->_hasDeprecatedCalls) {
            trigger_deprecation('symfony/config', '7.4', 'Calling any fluent method on "%s" is deprecated; pass the configuration to the constructor instead.', $this::class);
        }

        return $output;
    }

}
