<?xml version="1.0" ?>

<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="shopware.installer.supportedLanguages" type="collection">
            <parameter key="cs" type="collection">
                <parameter key="id">cs-CZ</parameter>
                <parameter key="label">Český</parameter>
            </parameter>
            <parameter key="da-DK" type="collection">
                <parameter key="id">da-DK</parameter>
                <parameter key="label">Dansk</parameter>
            </parameter>
            <parameter key="de" type="collection">
                <parameter key="id">de-DE</parameter>
                <parameter key="label">Deutsch</parameter>
            </parameter>
            <parameter key="en-US" type="collection">
                <parameter key="id">en-US</parameter>
                <parameter key="label">English (US)</parameter>
            </parameter>
            <parameter key="en" type="collection">
                <parameter key="id">en-GB</parameter>
                <parameter key="label">English (UK)</parameter>
            </parameter>
            <parameter key="es-ES" type="collection">
                <parameter key="id">es-ES</parameter>
                <parameter key="label">Español</parameter>
            </parameter>
            <parameter key="fr" type="collection">
                <parameter key="id">fr-FR</parameter>
                <parameter key="label">Français</parameter>
            </parameter>
            <parameter key="it" type="collection">
                <parameter key="id">it-IT</parameter>
                <parameter key="label">Italiano</parameter>
            </parameter>
            <parameter key="nl" type="collection">
                <parameter key="id">nl-NL</parameter>
                <parameter key="label">Nederlands</parameter>
            </parameter>
            <parameter key="no" type="collection">
                <parameter key="id">no-NO</parameter>
                <parameter key="label">Norsk</parameter>
            </parameter>
            <parameter key="pl" type="collection">
                <parameter key="id">pl-PL</parameter>
                <parameter key="label">Język polski</parameter>
            </parameter>
            <parameter key="pt-PT" type="collection">
                <parameter key="id">pt-PT</parameter>
                <parameter key="label">Português</parameter>
            </parameter>
            <parameter key="sv-SE" type="collection">
                <parameter key="id">sv-SE</parameter>
                <parameter key="label">Svenska</parameter>
            </parameter>
        </parameter>

        <parameter key="shopware.installer.supportedCurrencies" type="collection">
            <parameter key="EUR">EUR</parameter>
            <parameter key="USD">USD</parameter>
            <parameter key="GBP">GBP</parameter>
            <parameter key="PLN">PLN</parameter>
            <parameter key="CHF">CHF</parameter>
            <parameter key="SEK">SEK</parameter>
            <parameter key="DKK">DKK</parameter>
            <parameter key="NOK">NOK</parameter>
            <parameter key="CZK">CZK</parameter>
        </parameter>

        <parameter key="shopware.installer.configurationPreselection" type="collection">
            <parameter key="cs" type="collection">
                <parameter key="currency">CZK</parameter>
            </parameter>
            <parameter key="da-DK" type="collection">
                <parameter key="currency">DKK</parameter>
            </parameter>
            <parameter key="de" type="collection">
                <parameter key="currency">EUR</parameter>
            </parameter>
            <parameter key="en-US" type="collection">
                <parameter key="currency">USD</parameter>
            </parameter>
            <parameter key="en" type="collection">
                <parameter key="currency">GBP</parameter>
            </parameter>
            <parameter key="es-ES" type="collection">
                <parameter key="currency">EUR</parameter>
            </parameter>
            <parameter key="fr" type="collection">
                <parameter key="currency">EUR</parameter>
            </parameter>
            <parameter key="it" type="collection">
                <parameter key="currency">EUR</parameter>
            </parameter>
            <parameter key="nl" type="collection">
                <parameter key="currency">EUR</parameter>
            </parameter>
            <parameter key="no" type="collection">
                <parameter key="currency">NOK</parameter>
            </parameter>
            <parameter key="pl" type="collection">
                <parameter key="currency">PLN</parameter>
            </parameter>
            <parameter key="pt-PT" type="collection">
                <parameter key="currency">EUR</parameter>
            </parameter>
            <parameter key="sv-SE" type="collection">
                <parameter key="currency">SEK</parameter>
            </parameter>
        </parameter>

        <parameter key="shopware.installer.tosUrls" type="collection">
            <parameter key="de">https://api.shopware.com/gtc/de_DE.html</parameter>
            <parameter key="en">https://api.shopware.com/gtc/en_GB.html</parameter>
        </parameter>
    </parameters>
    <services>
        <service id="shopware.asset.asset" class="Shopware\Core\Framework\Adapter\Asset\FallbackUrlPackage">
            <argument type="collection">
                <argument></argument>
            </argument>
            <argument type="service" id="shopware.asset.version_strategy"/>
            <tag name="assets.package" package="asset"/>
        </service>

        <service id="shopware.asset.version_strategy" class="Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy"/>

        <service id="Shopware\Core\Installer\Subscriber\InstallerLocaleListener">
            <argument>%shopware.installer.supportedLanguages%</argument>

            <tag name="kernel.event_subscriber"/>
        </service>

        <service id="Composer\Repository\PlatformRepository"/>

        <service id="Composer\Composer">
            <factory class="Shopware\Core\Framework\Plugin\Composer\Factory" method="createComposer"/>
            <argument type="string">%kernel.project_dir%</argument>
        </service>


        <service id="Shopware\Core\Installer\Requirements\EnvironmentRequirementsValidator">
            <argument type="service" id="Composer\Composer"/>
            <argument type="service" id="Composer\Repository\PlatformRepository"/>

            <tag name="shopware.installer.requirement"/>
        </service>

        <service id="Shopware\Core\Installer\Requirements\FilesystemRequirementsValidator">
            <argument type="string">%kernel.project_dir%</argument>

            <tag name="shopware.installer.requirement"/>
        </service>

        <service id="Shopware\Core\Installer\Requirements\ConfigurationRequirementsValidator">
            <argument type="service" id="Shopware\Core\Installer\Requirements\IniConfigReader"/>

            <tag name="shopware.installer.requirement"/>
        </service>

        <service id="Shopware\Core\Installer\Requirements\IniConfigReader"/>

        <service id="shopware.installer.guzzle" class="GuzzleHttp\Client"/>

        <service id="Shopware\Core\Installer\License\LicenseFetcher">
            <argument type="service" id="shopware.installer.guzzle"/>
            <argument>%shopware.installer.tosUrls%</argument>

        </service>

        <service id="Shopware\Core\Installer\Controller\WelcomeController" public="true">
            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="Shopware\Core\Installer\Controller\RequirementsController" public="true">
            <argument type="tagged_iterator" tag="shopware.installer.requirement"/>
            <argument type="string">%kernel.project_dir%</argument>

            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="Shopware\Core\Installer\Controller\LicenseController" public="true">
            <argument type="service" id="Shopware\Core\Installer\License\LicenseFetcher"/>

            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="Shopware\Core\Installer\Controller\DatabaseConfigurationController" public="true">
            <argument type="service" id="translator"/>
            <argument type="service" id="Shopware\Core\Installer\Database\BlueGreenDeploymentService"/>
            <argument type="service" id="Shopware\Core\Maintenance\System\Service\SetupDatabaseAdapter"/>
            <argument type="service" id="Shopware\Core\Maintenance\System\Service\DatabaseConnectionFactory"/>

            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="Shopware\Core\Installer\Controller\DatabaseImportController" public="true">
            <argument type="service" id="Shopware\Core\Maintenance\System\Service\DatabaseConnectionFactory"/>
            <argument type="service" id="Shopware\Core\Installer\Database\DatabaseMigrator"/>

            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="Shopware\Core\Installer\Controller\ShopConfigurationController" public="true">
            <argument type="service" id="Shopware\Core\Maintenance\System\Service\DatabaseConnectionFactory"/>
            <argument type="service" id="Shopware\Core\Installer\Configuration\EnvConfigWriter"/>
            <argument type="service" id="Shopware\Core\Installer\Configuration\ShopConfigurationService"/>
            <argument type="service" id="Shopware\Core\Installer\Configuration\AdminConfigurationService"/>
            <argument type="service" id="translator"/>
            <argument>%shopware.installer.supportedLanguages%</argument>
            <argument>%shopware.installer.supportedCurrencies%</argument>

            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="Shopware\Core\Installer\Controller\FinishController" public="true">
            <argument type="service" id="Shopware\Core\Installer\Finish\SystemLocker"/>
            <argument type="service" id="GuzzleHttp\Client"/>
            <argument>%env(string:APP_URL)%</argument>

            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="Shopware\Core\Installer\Database\BlueGreenDeploymentService"/>

        <service id="Shopware\Core\Maintenance\System\Service\SetupDatabaseAdapter"/>

        <service id="Shopware\Core\Maintenance\System\Service\DatabaseConnectionFactory"/>

        <service id="Shopware\Core\Installer\Database\DatabaseMigrator">
            <argument type="service" id="Shopware\Core\Maintenance\System\Service\SetupDatabaseAdapter"/>
            <argument type="service" id="Shopware\Core\Installer\Database\MigrationCollectionFactory"/>
            <argument type="string">%kernel.shopware_version%</argument>
        </service>

        <service id="Shopware\Core\Installer\Database\MigrationCollectionFactory">
            <argument type="string">%kernel.project_dir%</argument>
        </service>

        <service id="Shopware\Core\Installer\Configuration\EnvConfigWriter">
            <argument type="string">%kernel.project_dir%</argument>
            <argument type="service" id="Shopware\Core\Installer\Finish\UniqueIdGenerator"/>
        </service>

        <service id="Shopware\Core\Installer\Configuration\ShopConfigurationService">
            <argument type="service" id="event_dispatcher"/>
        </service>

        <service id="Shopware\Core\Installer\Configuration\AdminConfigurationService"/>

        <service id="Shopware\Core\Installer\Finish\SystemLocker">
            <argument type="string">%kernel.project_dir%</argument>
        </service>

        <service id="Shopware\Core\Installer\Finish\UniqueIdGenerator">
            <argument type="string">%kernel.project_dir%</argument>
        </service>

        <service id="GuzzleHttp\Client"/>
    </services>
</container>
