<?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="order.comment.comment" class="OrderComment\Loop\OrderCommentLoop"/>
        <loop name="order.comment.session.comment" class="OrderComment\Loop\SessionOrderCommentLoop"/>
    </loops>

    <forms>
        <form name="order.comment.form" class="OrderComment\Form\CommentForm" />
    </forms>

    <services>
        <service id="order.comment.order.form" class="OrderComment\EventListeners\OrderFormListener">
            <tag name="kernel.event_subscriber"/>
        </service>
        <service id="order.comment.order.event" class="OrderComment\EventListeners\OrderEventListener">
            <argument type="service" id="request_stack" />
            <tag name="kernel.event_subscriber"/>
        </service>
    </services>

    <hooks>
        <hook id="order.comment.hook.back" class="OrderComment\Hook\BackHook" scope="request">
            <tag name="hook.event_listener" type="back" event="order-edit.after-order-product-list" method="onOrderEditAfterOrderProductList"/>
            <tag name="hook.event_listener" type="back" event="order-edit.bill-bottom" method="onOrderEditBillBottom"/>
            <tag name="hook.event_listener" type="back" event="order.tab-content" method="onOrderTabContent"/>
        </hook>
        <hook id="order.comment.hook.front" class="OrderComment\Hook\FrontHook" scope="request">
            <tag name="hook.event_listener" type="front" event="cart.bottom" method="onCartBottom"/>
            <tag name="hook.event_listener" type="front" event="cart.after-javascript-include" method="onCartIncludeJs"/>
            <tag name="hook.event_listener" type="front" event="order-delivery.form-bottom" method="onDeliveryFormBottom"/>
        </hook>
        <hook id="order.comment.hook.pdf" class="OrderComment\Hook\PdfHook" scope="request">
            <tag name="hook.event_listener" type="pdf" event="delivery.after-summary" method="onDeliveryAfterSummary"/>
        </hook>
    </hooks>

</config>