<?xml version="1.0" ?>

<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="shopware_emotion.emotion_hydrator" class="Shopware\Bundle\EmotionBundle\Service\Gateway\Hydrator\EmotionHydrator">
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Gateway\DBAL\Hydrator\AttributeHydrator" />
        </service>

        <service id="shopware_emotion.emotion_element_hydrator" class="Shopware\Bundle\EmotionBundle\Service\Gateway\Hydrator\EmotionElementHydrator" />

        <service id="shopware_emotion.emotion_gateway" class="Shopware\Bundle\EmotionBundle\Service\Gateway\EmotionGateway">
            <argument type="service" id="Shopware\Bundle\EmotionBundle\Service\Gateway\Hydrator\EmotionHydrator" />
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Gateway\DBAL\FieldHelper" />
            <argument type="service" id="Doctrine\DBAL\Connection" />
        </service>

        <service id="shopware_emotion.emotion_service" class="Shopware\Bundle\EmotionBundle\Service\EmotionService">
            <argument type="service" id="Shopware\Bundle\EmotionBundle\Service\Gateway\EmotionGateway" />
            <argument type="service" id="Shopware\Bundle\EmotionBundle\Service\EmotionElementServiceInterface" />
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Gateway\ShopGatewayInterface" />
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Service\CategoryServiceInterface" />
        </service>

        <service id="shopware_emotion.store_front_emotion_device_configuration" class="Shopware\Bundle\EmotionBundle\Service\StoreFrontEmotionDeviceConfiguration">
            <argument type="service" id="Shopware\Components\Emotion\DeviceConfiguration" />
        </service>

        <service id="shopware_emotion.emotion_element_gateway" class="Shopware\Bundle\EmotionBundle\Service\Gateway\EmotionElementGateway">
            <argument type="service" id="Shopware\Bundle\EmotionBundle\Service\Gateway\Hydrator\EmotionElementHydrator" />
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Gateway\DBAL\FieldHelper" />
            <argument type="service" id="Doctrine\DBAL\Connection" />
        </service>

        <service id="shopware_emotion.data_collection_resolver" class="Shopware\Bundle\EmotionBundle\Service\DataCollectionResolver">
            <argument type="service" id="Shopware\Bundle\SearchBundle\BatchProductSearch" />
            <argument type="service" id="Doctrine\DBAL\Connection" />
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Service\MediaServiceInterface" />
        </service>

        <service id="shopware_emotion.emotion_element_service" class="Shopware\Bundle\EmotionBundle\Service\EmotionElementService">
            <argument type="tagged" tag="shopware_emotion.component_handler" />
            <argument type="service" id="Shopware\Bundle\EmotionBundle\Service\Gateway\EmotionElementGateway" />
            <argument type="service" id="shopware_emotion.component_handler.event_fallback"/>
            <argument type="service" id="Shopware\Bundle\EmotionBundle\Service\DataCollectionResolverInterface" />
            <argument type="service" id="Shopware\Components\ContainerAwareEventManager"/>
        </service>

        <service id="shopware_emotion.emotion_struct_converter" class="Shopware\Bundle\EmotionBundle\Service\StructConverter">
            <argument type="service" id="Shopware\Components\Compatibility\LegacyStructConverter" />
            <argument type="service" id="Shopware\Components\ContainerAwareEventManager" />
            <argument type="service" id="config" />
        </service>

        <!-- ComponentHandler -->
        <service id="shopware_emotion.component_handler.event_fallback" class="Shopware\Bundle\EmotionBundle\ComponentHandler\EventComponentHandler">
            <argument type="service" id="Shopware\Components\ContainerAwareEventManager" />

            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.article" class="Shopware\Bundle\EmotionBundle\ComponentHandler\ArticleComponentHandler">
            <argument type="service" id="Shopware\Bundle\SearchBundle\StoreFrontCriteriaFactoryInterface" />
            <argument type="service" id="Shopware_Components_Config" />
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Service\AdditionalTextServiceInterface" />

            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.article_slider" class="Shopware\Bundle\EmotionBundle\ComponentHandler\ArticleSliderComponentHandler">
            <argument type="service" id="Shopware\Bundle\SearchBundle\StoreFrontCriteriaFactoryInterface" />
            <argument type="service" id="Shopware\Components\ProductStream\Repository" />
            <argument type="service" id="Shopware_Components_Config" />
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Service\AdditionalTextServiceInterface" />

            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.banner" class="Shopware\Bundle\EmotionBundle\ComponentHandler\BannerComponentHandler">
            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.category_teaser" class="Shopware\Bundle\EmotionBundle\ComponentHandler\CategoryTeaserComponentHandler">
            <argument type="service" id="Shopware\Bundle\SearchBundle\StoreFrontCriteriaFactoryInterface" />
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Service\CategoryServiceInterface" />
            <argument type="service" id="Doctrine\DBAL\Connection" />
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Service\BlogServiceInterface" />

            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.manufacturer_slider" class="Shopware\Bundle\EmotionBundle\ComponentHandler\ManufacturerSliderComponentHandler">
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Service\ManufacturerServiceInterface" />
            <argument type="service" id="Doctrine\DBAL\Connection" />

            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.blog" class="Shopware\Bundle\EmotionBundle\ComponentHandler\BlogComponentHandler">
            <argument type="service" id="Shopware\Bundle\StoreFrontBundle\Service\BlogServiceInterface" />
            <argument type="service" id="Doctrine\DBAL\Connection" />

            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.html5video" class="Shopware\Bundle\EmotionBundle\ComponentHandler\Html5VideoComponentHandler">
            <argument type="service" id="Shopware\Bundle\MediaBundle\MediaServiceInterface" />

            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.banner_slider" class="Shopware\Bundle\EmotionBundle\ComponentHandler\BannerSliderComponentHandler">
            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.youtube" class="Shopware\Bundle\EmotionBundle\ComponentHandler\YoutubeComponentHandler">
            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.html_element" class="Shopware\Bundle\EmotionBundle\ComponentHandler\HtmlElementComponentHandler">
            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.iframe" class="Shopware\Bundle\EmotionBundle\ComponentHandler\IFrameComponentHandler">
            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_emotion.component_handler.html_code" class="Shopware\Bundle\EmotionBundle\ComponentHandler\HtmlCodeComponentHandler">
            <tag name="shopware_emotion.component_handler"/>
        </service>

        <service id="shopware_bundle_emotion.component_handler.content_type_component_handler" class="Shopware\Bundle\EmotionBundle\ComponentHandler\ContentTypeComponentHandler">
            <argument type="service" id="service_container" />

            <tag name="shopware_emotion.component_handler"/>
        </service>

    </services>
</container>
