<?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">

    <loops>
        <loop class="Colissimo\Loop\Price" name="colissimo"/>
        <loop class="Colissimo\Loop\CheckRightsLoop" name="colissimo.check.rights" />
        <loop class="Colissimo\Loop\NotSendLoop" name="colissimo.notsend.loop" />
    </loops>

    <forms>
        <form name="colissimo.freeshipping.form" class="Colissimo\Form\FreeShipping" />
        <form name="colissimo.export.form" class="Colissimo\Form\Export" />
        <form name="colissimo.configuration" class="Colissimo\Form\Configuration" />
    </forms>

    <services>
        <service id="send.colissimo.mail" class="Colissimo\Listener\SendMail">
            <argument type="service" id="thelia.parser" />
            <argument type="service" id="mailer"/>
            <tag name="kernel.event_subscriber"/>
        </service>
    </services>

    <services>
        <service id="area.deleted.listener" class="Colissimo\EventListener\AreaDeletedListener" scope="request">
            <tag name="kernel.event_subscriber"/>
            <argument type="service" id="request" />
        </service>
    </services>

    <hooks>
        <hook id="colissimo.hook" class="Colissimo\Hook\HookManager">
            <tag name="hook.event_listener" event="module.configuration" type="back" method="onModuleConfiguration" />
            <tag name="hook.event_listener" event="module.config-js" type="back" templates="render:assets/js/module-configuration-js.html" />
        </hook>
    </hooks>
</config>
