<?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" />
    </imports>

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

        <service id="sylius.context.currency.composite" class="Sylius\Component\Currency\Context\CompositeCurrencyContext" decorates="sylius.context.currency" decoration-priority="256" public="false" />

        <service id="sylius.currency_converter" class="Sylius\Component\Currency\Converter\CurrencyConverter">
            <argument type="service" id="sylius.repository.exchange_rate" />
        </service>
        <service id="Sylius\Component\Currency\Converter\CurrencyConverterInterface" alias="sylius.currency_converter" />

        <service id="sylius.currency_name_converter" class="Sylius\Component\Currency\Converter\CurrencyNameConverter" />
        <service id="Sylius\Component\Currency\Converter\CurrencyNameConverterInterface" alias="sylius.currency_name_converter" />

        <service id="sylius.templating.helper.currency" class="Sylius\Bundle\CurrencyBundle\Templating\Helper\CurrencyHelper" lazy="true">
            <tag name="templating.helper" alias="sylius_currency" />
        </service>

        <service id="sylius.twig.extension.currency" class="Sylius\Bundle\CurrencyBundle\Twig\CurrencyExtension" public="false">
            <argument type="service" id="sylius.templating.helper.currency" />
            <tag name="twig.extension" />
        </service>

        <service id="sylius.validator.different_source_target_currency" class="Sylius\Bundle\CurrencyBundle\Validator\Constraints\DifferentSourceTargetCurrencyValidator">
            <tag name="validator.constraint_validator" />
        </service>

        <service id="sylius.validator.unique_currency_pair" class="Sylius\Bundle\CurrencyBundle\Validator\Constraints\UniqueCurrencyPairValidator">
            <argument type="service" id="sylius.repository.exchange_rate" />
            <tag name="validator.constraint_validator" />
        </service>
    </services>
</container>
