<?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\CoreBundle\MessageHandler\Admin\Account\RequestResetPasswordEmailHandler">
            <argument type="service" id="sylius.repository.admin_user" />
            <argument type="service" id="sylius.admin_user.token_generator.password_reset" />
            <argument type="service" id="Sylius\Calendar\Provider\DateTimeProviderInterface" />
            <argument type="service" id="messenger.default_bus" />
            <tag name="messenger.message_handler" bus="sylius.command_bus" />
            <tag name="messenger.message_handler" bus="sylius_default.bus" />
        </service>

        <service id="Sylius\Bundle\CoreBundle\MessageHandler\ResendShipmentConfirmationEmailHandler">
            <argument type="service" id="sylius.repository.shipment" />
            <argument type="service" id="Sylius\Bundle\CoreBundle\Mailer\ShipmentEmailManagerInterface" />
            <tag name="messenger.message_handler" bus="sylius.command_bus" />
            <tag name="messenger.message_handler" bus="sylius_default.bus" />
        </service>

        <service id="Sylius\Bundle\CoreBundle\MessageHandler\Admin\Account\ResetPasswordHandler">
            <argument type="service" id="sylius.user_password_resetter.admin" />

            <tag name="messenger.message_handler" bus="sylius.command_bus" />
            <tag name="messenger.message_handler" bus="sylius_default.bus" />
        </service>

        <service id="Sylius\Bundle\CoreBundle\MessageHandler\ResendOrderConfirmationEmailHandler">
            <argument type="service" id="Sylius\Bundle\CoreBundle\Mailer\OrderEmailManagerInterface" />
            <argument type="service" id="sylius.repository.order" />
            <tag name="messenger.message_handler" bus="sylius.command_bus" />
            <tag name="messenger.message_handler" bus="sylius_default.bus" />
        </service>

        <service id="Sylius\Bundle\CoreBundle\MessageHandler\Admin\Account\SendResetPasswordEmailHandler">
            <argument type="service" id="sylius.repository.admin_user"/>
            <argument type="service" id="Sylius\Bundle\CoreBundle\Mailer\ResetPasswordEmailManagerInterface" />

            <tag name="messenger.message_handler" bus="sylius.command_bus" />
            <tag name="messenger.message_handler" bus="sylius_default.bus" />
        </service>
    </services>
</container>
