<?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.context.channel.fake_channel.persister" class="Sylius\Bundle\ChannelBundle\Context\FakeChannel\FakeChannelPersister">
            <argument type="service" id="sylius.context.channel.fake_channel.code_provider" />
            <tag name="kernel.event_listener" event="kernel.response" method="onKernelResponse" priority="-8192" />
        </service>

        <service id="sylius.context.channel.fake_channel.code_provider" class="Sylius\Bundle\ChannelBundle\Context\FakeChannel\FakeChannelCodeProvider" public="false" />
        <service id="Sylius\Bundle\ChannelBundle\Context\FakeChannel\FakeChannelCodeProviderInterface" alias="sylius.context.channel.fake_channel.code_provider" />

        <service id="sylius.context.channel.fake_channel.context" class="Sylius\Bundle\ChannelBundle\Context\FakeChannel\FakeChannelContext" public="false">
            <argument type="service" id="sylius.context.channel.fake_channel.code_provider" />
            <argument type="service" id="sylius.repository.channel" />
            <argument type="service" id="request_stack" />
            <tag name="sylius.context.channel" priority="128" />
        </service>
    </services>
</container>
