<?xml version="1.0"?>
<!--
/**
 * Copyright © Zhik Pty Ltd. All rights reserved.
 * See LICENSE.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

    <!--
    Note: We cannot conditionally disable the observer here, but we document
    that the PreventStockDeduction plugin handles this dynamically.
    The plugin on SubtractQuoteInventoryObserver prevents stock deduction for forward orders.
    -->

    <!-- Future: We could add our own observer here to handle forward order specific logic -->

    <!-- Observer to transfer ordering period data from quote to order -->
    <event name="sales_model_service_quote_submit_before">
        <observer name="zhik_forward_order_save_ordering_period" instance="Zhik\ForwardOrder\Observer\SaveOrderingPeriod" />
    </event>

</config>