<?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="false" />

        <service
            id="Sylius\Bundle\ApiBundle\SerializerContextBuilder\ChannelContextBuilder"
            decorates="api_platform.serializer.context_builder"
            decoration-priority="64"
        >
            <argument type="service" id="Sylius\Bundle\ApiBundle\SerializerContextBuilder\ChannelContextBuilder.inner" />
            <argument type="service" id="sylius.context.channel" />
        </service>

        <service
            id="Sylius\Bundle\ApiBundle\SerializerContextBuilder\ReadOperationContextBuilder"
            decorates="api_platform.serializer.context_builder"
            decoration-priority="64"
        >
            <argument type="service" id=".inner" />
            <argument>%sylius_api.serialization_groups.skip_adding_read_group%</argument>
            <argument>%sylius_api.serialization_groups.skip_adding_index_and_show_groups%</argument>
        </service>

        <service
            id="Sylius\Bundle\ApiBundle\SerializerContextBuilder\LocaleContextBuilder"
            decorates="api_platform.serializer.context_builder"
            decoration-priority="64"
        >
            <argument type="service" id="Sylius\Bundle\ApiBundle\SerializerContextBuilder\LocaleContextBuilder.inner" />
            <argument type="service" id="sylius.context.locale" />
        </service>

        <service
            id="Sylius\Bundle\ApiBundle\SerializerContextBuilder\HttpRequestMethodTypeContextBuilder"
            decorates="api_platform.serializer.context_builder"
            decoration-priority="64"
        >
            <argument type="service" id="Sylius\Bundle\ApiBundle\SerializerContextBuilder\HttpRequestMethodTypeContextBuilder.inner" />
        </service>
    </services>
</container>
