<?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 name="deliveryround" class="DeliveryRound\Loop\DeliveryRoundLoop" />
    </loops>

    <forms>
        <form name="deliveryround_config_form" class="DeliveryRound\Form\DeliveryRoundConfigForm" />
        <form name="deliveryround_form" class="DeliveryRound\Form\DeliveryRoundForm" />
        <form name="deliveryround_delete_form" class="DeliveryRound\Form\DeliveryRoundDeleteForm" />
        <form name="deliveryround_update_form" class="DeliveryRound\Form\DeliveryRoundUpdateForm" />
    </forms>

    <hooks>
        <hook id="deliveryround.hook" class="DeliveryRound\Hook\DeliveryRoundHook" scope="request">
            <tag name="hook.event_listener" event="module.configuration" type="back" method="onModuleConfig" />
            <tag name="hook.event_listener" event="module.config-js" type="back" method="onModuleConfigJs" />
            <tag name="hook.event_listener" event="order-delivery.extra" type="front" method="onOrderDeliveryExtra"/>
        </hook>
    </hooks>

    <services>
        <service id="send.deliveryround.mail" class="DeliveryRound\EventListeners\SendEMail" scope="request">
            <argument type="service" id="thelia.parser" />
            <argument type="service" id="mailer"/>
            <tag name="kernel.event_subscriber"/>
        </service>
    </services>

</config>
