<?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">
    <services>
        <service id="RiccardoJtlGuard\Sync\ProductPayloadGuard"/>

        <service id="RiccardoJtlGuard\Sync\WawiDetector">
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>
        </service>

        <service id="RiccardoJtlGuard\Api\WawiDeleteGuard">
            <argument type="service" id="RiccardoJtlGuard\Sync\WawiDetector"/>
            <argument type="service" id="logger"/>
            <tag name="kernel.event_subscriber"/>
        </service>

        <service id="RiccardoJtlGuard\Sync\GuardedSyncService"
                 decorates="Shopware\Core\Framework\Api\Sync\SyncService">
            <argument type="service" id="RiccardoJtlGuard\Sync\GuardedSyncService.inner"/>
            <argument type="service" id="RiccardoJtlGuard\Sync\ProductPayloadGuard"/>
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <argument type="service" id="Shopware\Core\System\SystemConfig\SystemConfigService"/>
            <argument type="service" id="RiccardoJtlGuard\Sync\WawiDetector"/>
            <argument type="service" id="logger"/>
        </service>
    </services>
</container>
