<?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">
    <parameters>
        <parameter key="sylius.admin.notification.uri">https://gus.sylius.com/version</parameter>
    </parameters>

    <services>
        <defaults public="true" />

        <service id="Sylius\Bundle\AdminBundle\Action\Account\RenderResetPasswordPageAction">
            <argument type="service" id="sylius.repository.admin_user" />
            <argument type="service" id="form.factory" />
            <argument type="service" id="request_stack" />
            <argument type="service" id="router" />
            <argument type="service" id="twig" />
            <argument type="string">%sylius.admin_user.token.password_reset.ttl%</argument>
        </service>

        <service id="Sylius\Bundle\AdminBundle\Action\Account\ResetPasswordAction">
            <argument type="service" id="form.factory" />
            <argument type="service" id="Sylius\Bundle\CoreBundle\MessageDispatcher\ResetPasswordDispatcher" />
            <argument type="service" id="request_stack" />
            <argument type="service" id="router" />
            <argument type="service" id="twig" />
        </service>

        <service id="Sylius\Bundle\AdminBundle\Action\RemoveAvatarAction" public="true">
            <argument type='service' id="sylius.repository.avatar_image" />
            <argument type="service" id="router" />
            <argument type="service" id="security.csrf.token_manager" />
        </service>

        <service id="Sylius\Bundle\AdminBundle\Action\ResendOrderConfirmationEmailAction" public="true">
            <argument type='service' id="sylius.repository.order" />
            <argument type="service" id="Sylius\Bundle\CoreBundle\MessageDispatcher\ResendOrderConfirmationEmailDispatcherInterface" />
            <argument type="service" id="security.csrf.token_manager" />
            <argument type="service" id="request_stack" />
        </service>

        <service id="Sylius\Bundle\AdminBundle\Action\ResendShipmentConfirmationEmailAction" public="true">
            <argument type='service' id="sylius.repository.shipment" />
            <argument type="service" id="Sylius\Bundle\CoreBundle\MessageDispatcher\ResendShipmentConfirmationEmailDispatcher" />
            <argument type="service" id="security.csrf.token_manager" />
            <argument type="service" id="request_stack" />
        </service>

        <service id="Sylius\Bundle\AdminBundle\Action\Account\RenderRequestPasswordResetPageAction">
            <argument type="service" id="twig"/>
            <argument type="service" id="form.factory"/>
        </service>

        <service id="Sylius\Bundle\AdminBundle\Action\Account\RequestPasswordResetAction">
            <argument type="service" id="form.factory"/>
            <argument type="service" id="sylius.command_bus"/>
            <argument type="service" id="request_stack" />
            <argument type="service" id="router"/>
            <argument type="service" id="twig" />
        </service>

        <service id="sylius.controller.admin.dashboard" class="Sylius\Bundle\AdminBundle\Controller\DashboardController" public="true">
            <argument type="service" id="sylius.repository.channel" />
            <argument type="service" id="twig" />
            <argument type="service" id="router" />
            <argument type="service" id="Sylius\Bundle\AdminBundle\Provider\StatisticsDataProviderInterface" />
        </service>

        <service id="sylius.controller.admin.dashboard.statistics" class="Sylius\Bundle\AdminBundle\Controller\Dashboard\StatisticsController">
            <argument type="service" id="twig" />
            <argument type="service" id="Sylius\Bundle\AdminBundle\Provider\StatisticsDataProviderInterface" />
        </service>

        <service id="sylius.controller.customer_statistics" class="Sylius\Bundle\AdminBundle\Controller\CustomerStatisticsController" public="true">
            <argument type='service' id="sylius.customer_statistics_provider" />
            <argument type='service' id="sylius.repository.customer" />
            <argument type='service' id="twig" />
        </service>

        <service id="sylius.controller.admin.notification" class="Sylius\Bundle\AdminBundle\Controller\NotificationController" public="true">
            <argument type="service" id="sylius.http_client" />
            <argument type="service" id="Psr\Http\Message\RequestFactoryInterface" />
            <argument type="string">%sylius.admin.notification.uri%</argument>
            <argument type="string">%kernel.environment%</argument>
            <argument type="service" id="Psr\Http\Message\StreamFactoryInterface" />
        </service>

        <service id="Sylius\Bundle\AdminBundle\Controller\RemoveCatalogPromotionAction" public="true">
            <argument type="service" id="Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionRemovalProcessorInterface" />
        </service>

        <service
            id="Sylius\Bundle\AdminBundle\Controller\RedirectHandler"
            decorates="sylius.resource_controller.redirect_handler"
            public="false"
        >
            <argument type="service" id="Sylius\Bundle\AdminBundle\Controller\RedirectHandler.inner" />
            <argument type="service" id="Sylius\Bundle\UiBundle\Storage\FilterStorage" />
        </service>
    </services>
</container>
