<?php

namespace Dalten\RuianToUir\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

/**
 * Class RuianToUirExtension.
 */
class RuianToUirExtension extends Extension
{
    public function load(array $configs, ContainerBuilder $container): void
    {
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../../config'));
        $loader->load('services.yml');
        $container->setParameter(
            'ruian_to_uir.database_structure_definition', __DIR__.'/../../datovy_model.sql'
        );
        $container->setParameter(
            'ruian_to_uir.uir_compatibility_definition', __DIR__.'/../../uir-compat.sql'
        );
        $container->setParameter(
            'ruian_to_uir.rmix_compatibility_definition', __DIR__.'/../../
            rmix-compat.sql'
        );
        $container->setParameter(
            'ruian_to_uir.country_list_definition', __DIR__.'/../../stat.sql'
        );
    }

    #[\Override]
    public function getAlias(): string
    {
        return __CLASS__;
    }
}
