# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.

# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
parameters:

services:
    # default configuration for services in *this* file
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
        bind:
            $kernelProjectDir: '%kernel.project_dir%'

    # makes classes in src/ available to be used as services
    # this creates a service per class whose id is the fully-qualified class name
    App\:
        resource: '../src/'
        exclude:
            - '../src/DependencyInjection/'
            - '../src/Entity/'
            - '../src/Event/EventListener'
            - '../src/Helper/'
            - '../src/Kernel.php'
            - '../src/Tests/'

    App\DataTable\DataTableFactory:
        arguments:
            - '%datatables.config%'
            - '@Omines\DataTablesBundle\Twig\TwigRenderer'
            - '@Omines\DataTablesBundle\DependencyInjection\Instantiator'
            - '@event_dispatcher'
    App\DataTable\Column\ActionsColumn\ActionButton:
        public: true
        shared: false
    App\DataTable\Column\ActionsColumn\ActionDynamic:
        public: true
        shared: false
    App\DataTable\Column\ActionsColumn\ActionRoute:
        public: true
        shared: false
    App\DataTable\Column\ActionsColumn\ActionSubmit:
        public: true
        shared: false
    App\DataTable\Column\ActionsColumn\ActionSubmitConfirm:
        public: true
        shared: false

    App\Event\EventListener\ExceptionToJsonListener:
        tags:
            - { name: kernel.event_listener, event: kernel.exception }

    App\Event\EventListener\SolicitudSucursalDeletedListener:
        tags:
            -
                name: 'doctrine.orm.entity_listener'
                event: preRemove
                entity: App\Entity\Solicitud\SolicitudSucursal

    App\Service\CodigoPostal:
        $layoutUrl: '/472/visor/javascript/layout.aspx'
        $codigoPostalUrl: '/RestService472/CodigoPostal/EntryOrdinary'

    App\Service\File\FileService:
        $kernelProjectDir: '%kernel.project_dir%'

    App\Service\Configuracion\Mailer:
        factory: [ '@App\Service\Configuracion\Configuracion', mailer ]

    App\Service\ExportImport\DbService:
        $migrationsDependencyFactory: '@doctrine.migrations.dependency_factory'

    App\Service\Seed\CentroPobladoSeed:
        factory: ['@App\Service\Seed\SeedFactory', 'createCentroPobladoSeed']
    App\Service\Seed\CiiuSeed:
        factory: [ '@App\Service\Seed\SeedFactory', 'createCiiuSeed' ]
    App\Service\Seed\ContactoTipoSeed:
        factory: [ '@App\Service\Seed\SeedFactory', 'createContactoTipoSeed' ]
    App\Service\Seed\DocumentoTipoSeed:
        factory: [ '@App\Service\Seed\SeedFactory', 'createDocumentoTipoSeed' ]
    App\Service\Seed\IdentificacionTipoSeed:
        factory: ['@App\Service\Seed\SeedFactory', 'createIdentificacionTipoSeed']
    App\Service\Seed\PaisSeed:
        factory: [ '@App\Service\Seed\SeedFactory', 'createPaisSeed' ]
    App\Service\Seed\RegimenTipoSeed:
        factory: [ '@App\Service\Seed\SeedFactory', 'createRegimenTipoSeed' ]
    App\Service\Seed\SociedadTipoSeed:
        factory: [ '@App\Service\Seed\SeedFactory', 'createSociedadTipoSeed' ]
    App\Service\Seed\UserSeed:
        factory: ['@App\Service\Seed\SeedFactory', 'createUserSeed']