<?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"
>
    <services>
        <defaults public="true" />

        <service id="Sylius\Bundle\ApiBundle\DataPersister\AddressDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <argument type="service" id="Sylius\Bundle\ApiBundle\Context\UserContextInterface" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\AdminUserDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <argument type="service" id="security.token_storage" />
            <argument type="service" id="sylius.security.password_updater" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\ChannelDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <argument type="service" id="sylius.checker.channel_deletion" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\MessengerDataPersister">
            <argument type="service" id="api_platform.messenger.data_persister" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\CountryDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <argument type="service" id="Sylius\Component\Addressing\Checker\CountryProvincesDeletionCheckerInterface" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\LocaleDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <argument type="service" id="Sylius\Bundle\LocaleBundle\Checker\LocaleUsageCheckerInterface" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\ShippingMethodDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\PaymentMethodDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\ProductDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\ProductAttributeDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\ProductTaxonDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <argument type="service" id="sylius.event_bus" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\ProductVariantDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\PromotionCouponDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\TranslatableDataPersister">
            <argument type="service" id="sylius.translation_locale_provider" />
            <tag name="api_platform.data_persister" priority="128" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\ZoneDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <argument type="service" id="Sylius\Component\Addressing\Checker\ZoneDeletionCheckerInterface" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\PromotionDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <tag name="api_platform.data_persister" />
        </service>

        <service id="Sylius\Bundle\ApiBundle\DataPersister\CustomerDataPersister">
            <argument type="service" id="api_platform.doctrine.orm.data_persister" />
            <argument type="service" id="sylius.security.password_updater" />
            <tag name="api_platform.data_persister" />
        </service>
    </services>
</container>
