<?xml version="1.0" encoding="UTF-8" ?>

<config xmlns="http://thelia.net/schema/dic/config"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">

    <services>
        <!-- Coupon module -->

        <service id="thelia.facade" class="Thelia\Coupon\BaseFacade">
            <argument type="service" id="service_container" />
        </service>

        <service id="thelia.coupon.manager" class="Thelia\Coupon\CouponManager">
            <argument type="service" id="service_container" />
        </service>

        <service id="thelia.coupon.factory" class="Thelia\Coupon\CouponFactory">
            <argument type="service" id="service_container" />
        </service>

        <!-- Coupon types -->

        <service id="thelia.coupon.type.remove_x_amount" class="Thelia\Coupon\Type\RemoveXAmount">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <service id="thelia.coupon.type.remove_x_percent" class="Thelia\Coupon\Type\RemoveXPercent">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <service id="thelia.coupon.type.remove_amount_on_categories" class="Thelia\Coupon\Type\RemoveAmountOnCategories">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <service id="thelia.coupon.type.remove_percentage_on_categories" class="Thelia\Coupon\Type\RemovePercentageOnCategories">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <service id="thelia.coupon.type.remove_amount_on_products" class="Thelia\Coupon\Type\RemoveAmountOnProducts">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <service id="thelia.coupon.type.remove_percentage_on_products" class="Thelia\Coupon\Type\RemovePercentageOnProducts">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <service id="thelia.coupon.type.remove_percentage_on_products" class="Thelia\Coupon\Type\RemovePercentageOnProducts">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <service id="thelia.coupon.type.remove_amount_on_attribute_av" class="Thelia\Coupon\Type\RemoveAmountOnAttributeValues">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <service id="thelia.coupon.type.remove_percentage_on_attribute_av" class="Thelia\Coupon\Type\RemovePercentageOnAttributeValues">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <service id="thelia.coupon.type.free_product" class="Thelia\Coupon\Type\FreeProduct">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCoupon"/>
        </service>

        <!-- Condition module -->

        <service id="thelia.condition.factory" class="Thelia\Condition\ConditionFactory">
            <argument type="service" id="service_container" />
        </service>

        <service id="thelia.condition.validator" class="Thelia\Condition\ConditionEvaluator">
        </service>

        <service id="thelia.condition.match_for_everyone" class="Thelia\Condition\Implementation\MatchForEveryone">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

        <service id="thelia.condition.match_for_total_amount" class="Thelia\Condition\Implementation\MatchForTotalAmount">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

        <service id="thelia.condition.match_for_x_articles" class="Thelia\Condition\Implementation\MatchForXArticles">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

        <service id="thelia.condition.match_for_x_articles_include_quantity" class="Thelia\Condition\Implementation\MatchForXArticlesIncludeQuantity">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

        <service id="thelia.condition.match_delivery_countries" class="Thelia\Condition\Implementation\MatchDeliveryCountries">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

        <service id="thelia.condition.match_billing_countries" class="Thelia\Condition\Implementation\MatchBillingCountries">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

        <service id="thelia.condition.start_date" class="Thelia\Condition\Implementation\StartDate">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

        <service id="thelia.condition.cart_contains_categories" class="Thelia\Condition\Implementation\CartContainsCategories">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

        <service id="thelia.condition.cart_contains_products" class="Thelia\Condition\Implementation\CartContainsProducts">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

        <service id="thelia.condition.for_some_customers" class="Thelia\Condition\Implementation\ForSomeCustomers">
            <argument type="service" id="thelia.facade" />
            <tag name="thelia.coupon.addCondition"/>
        </service>

    </services>
</config>
