<?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>
        <service id="RiccardoOffers\Core\Content\Offer\OfferDefinition">
            <tag name="shopware.entity.definition" entity="riccardo_offer"/>
        </service>
        <service id="RiccardoOffers\Core\Content\Offer\Aggregate\OfferCustomerDefinition">
            <tag name="shopware.entity.definition" entity="riccardo_offer_customer"/>
        </service>
        <service id="RiccardoOffers\Core\Content\Offer\Aggregate\OfferStateDefinition">
            <tag name="shopware.entity.definition" entity="riccardo_offer_state"/>
        </service>

        <service id="RiccardoOffers\Core\Offer\OfferResolver">
            <argument type="service" id="riccardo_offer.repository"/>
            <argument type="service" id="riccardo_offer_state.repository"/>
        </service>

        <service id="RiccardoOffers\Storefront\Twig\OfferExtension">
            <tag name="twig.extension"/>
        </service>

        <service id="RiccardoOffers\Storefront\Controller\OfferWidgetController" public="true">
            <argument type="service" id="RiccardoOffers\Core\Offer\OfferResolver"/>
            <argument type="service" id="Shopware\Core\Checkout\Cart\SalesChannel\CartService"/>
            <argument type="service" id="Shopware\Core\Checkout\Promotion\Cart\PromotionItemBuilder"/>
            <call method="setContainer"><argument type="service" id="service_container"/></call>
        </service>
    </services>
</container>
