<?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">
    <parameters>
        <parameter key="sylius_installer_currency">USD</parameter>
    </parameters>
    <services>
        <defaults public="true" />

        <service id="sylius.installer.checker.command_directory" class="Sylius\Bundle\CoreBundle\Installer\Checker\CommandDirectoryChecker">
            <argument type="service" id="filesystem" />
        </service>
        <service id="sylius.installer.checker.sylius_requirements" class="Sylius\Bundle\CoreBundle\Installer\Checker\SyliusRequirementsChecker">
            <argument type="service" id="sylius.requirements" />
        </service>

        <service id="sylius.commands_provider.database_setup" class="Sylius\Bundle\CoreBundle\Installer\Provider\DatabaseSetupCommandsProvider">
            <argument type="service" id="doctrine.orm.entity_manager" />
        </service>
        <service id="Sylius\Bundle\CoreBundle\Installer\Provider\DatabaseSetupCommandsProviderInterface" alias="sylius.commands_provider.database_setup" />

        <service id="sylius.setup.currency" class="Sylius\Bundle\CoreBundle\Installer\Setup\CurrencySetup">
            <argument type="service" id="sylius.repository.currency" />
            <argument type="service" id="sylius.factory.currency" />
            <argument>%sylius_installer_currency%</argument>
        </service>
        <service id="Sylius\Bundle\CoreBundle\Installer\Setup\CurrencySetupInterface" alias="sylius.setup.currency" />

        <service id="sylius.setup.locale" class="Sylius\Bundle\CoreBundle\Installer\Setup\LocaleSetup">
            <argument type="service" id="sylius.repository.locale" />
            <argument type="service" id="sylius.factory.locale" />
            <argument>%locale%</argument>
            <argument type="service" id="filesystem" />
        </service>
        <service id="Sylius\Bundle\CoreBundle\Installer\Setup\LocaleSetupInterface" alias="sylius.setup.locale" />

        <service id="sylius.setup.channel" class="Sylius\Bundle\CoreBundle\Installer\Setup\ChannelSetup">
            <argument type="service" id="sylius.repository.channel" />
            <argument type="service" id="sylius.factory.channel" />
            <argument type="service" id="sylius.manager.channel" />
        </service>
        <service id="Sylius\Bundle\CoreBundle\Installer\Setup\ChannelSetupInterface" alias="sylius.setup.channel" />
    </services>
</container>
