<?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">
    <imports>
        <import resource="services/controller.xml" />
        <import resource="services/email.xml" />
        <import resource="services/listeners.xml" />
        <import resource="services/menu.xml" />
        <import resource="services/twig.xml" />
    </imports>
    <services>
        <defaults public="true" />

        <service id="sylius.section_resolver.shop_uri_based_section_resolver" class="Sylius\Bundle\ShopBundle\SectionResolver\ShopUriBasedSectionResolver">
            <argument>account</argument>
            <tag name="sylius.uri_based_section_resolver" priority="-10" />
        </service>

        <service id="sylius.context.cart.session_and_channel_based" class="Sylius\Bundle\CoreBundle\Context\SessionAndChannelBasedCartContext">
            <argument type="service" id="sylius.storage.cart_session" />
            <argument type="service" id="sylius.context.channel" />
            <tag name="sylius.context.cart" priority="-777" />
        </service>

        <service id="sylius.storage.cart_session" class="Sylius\Bundle\CoreBundle\Storage\CartSessionStorage">
            <argument type="service" id="request_stack" />
            <argument>_sylius.cart</argument>
            <argument type="service" id="sylius.repository.order" />
        </service>

        <service id="Sylius\Component\Core\Storage\CartStorageInterface" alias="sylius.storage.cart_session" />

        <service id="sylius.grid_filter.shop_string" class="Sylius\Component\Grid\Filter\StringFilter">
            <tag name="sylius.grid_filter" type="shop_string" form-type="Sylius\Bundle\GridBundle\Form\Type\Filter\StringFilterType" />
        </service>

        <service id="sylius.calculator.order_items_subtotal" class="Sylius\Bundle\ShopBundle\Calculator\OrderItemsSubtotalCalculator" />

        <service id="Sylius\Bundle\ShopBundle\Calculator\OrderItemsSubtotalCalculatorInterface" alias="sylius.calculator.order_items_subtotal" />
    </services>
</container>
