<?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.listener.shipment_ship" class="Sylius\Bundle\AdminBundle\EventListener\ShipmentShipListener">
            <argument type="service" id="sylius.mailer.shipment_email_manager.admin" />
            <tag name="kernel.event_listener" event="sylius.shipment.post_ship" method="sendConfirmationEmail" />
        </service>

        <service id="sylius.listener.locale" class="Sylius\Bundle\AdminBundle\EventListener\LocaleListener">
            <argument type="service" id="Sylius\Bundle\LocaleBundle\Checker\LocaleUsageCheckerInterface" />

            <tag name="kernel.event_listener" event="sylius.locale.pre_delete" method="preDelete" />
        </service>

        <service id="sylius.event_subscriber.resource_delete" class="Sylius\Bundle\AdminBundle\EventListener\ResourceDeleteSubscriber">
            <argument type="service" id="router" />
            <argument type="service" id="request_stack" />
            <tag name="kernel.event_subscriber" event="kernel.exception" />
        </service>

        <service id="sylius.event_subscriber.admin_cache_control_subscriber" class="Sylius\Bundle\AdminBundle\EventListener\AdminSectionCacheControlSubscriber">
            <argument type="service" id="sylius.section_resolver.uri_based_section_resolver" />
            <tag name="kernel.event_subscriber" event="kernel.response" />
        </service>

        <service id="sylius.event_subscriber.admin_filter_subscriber" class="Sylius\Bundle\AdminBundle\EventListener\AdminFilterSubscriber">
            <argument type="service" id="Sylius\Bundle\UiBundle\Storage\FilterStorage" />
            <tag name="kernel.event_subscriber" event="kernel.request" />
        </service>
    </services>
</container>
