<?xml version="1.0" encoding="UTF-8"?>

<!--

 This file is part of the Sylius package.

 (c) Sylius Sp. z o.o.

 For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.

-->

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
    <imports>
        <import resource="services/form.xml" />
        <import resource="services/tree_repository.xml" />
    </imports>

    <services>
        <defaults public="true" />

        <service id="sylius.controller.taxon_slug" class="Sylius\Bundle\TaxonomyBundle\Controller\TaxonSlugController">
            <argument type="service" id="sylius.generator.taxon_slug" />
            <argument type="service" id="sylius.repository.taxon" />
            <argument type="service" id="sylius.factory.taxon" />
        </service>

        <service id="sylius.controller.taxon_position" class="Sylius\Bundle\TaxonomyBundle\Controller\TaxonPositionController">
            <argument type="service" id="sylius.repository.taxon" />
            <argument type="service" id="sylius.manager.taxon" />
        </service>

        <service id="sylius.custom_factory.taxon" class="Sylius\Component\Taxonomy\Factory\TaxonFactory" decorates="sylius.factory.taxon" decoration-priority="256" public="false">
            <argument type="service" id="sylius.custom_factory.taxon.inner" />
        </service>
        <service id="Sylius\Component\Taxonomy\Factory\TaxonFactoryInterface" alias="sylius.custom_factory.taxon" />

        <service id="sylius.generator.taxon_slug" class="Sylius\Component\Taxonomy\Generator\TaxonSlugGenerator" />
        <service id="Sylius\Component\Taxonomy\Generator\TaxonSlugGeneratorInterface" alias="sylius.generator.taxon_slug" />
    </services>
</container>
