<?xml version="1.0"?>
<!--
/** 
 * Handles magento cart events
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_order_place_before">
        <observer name="salesOrderPlaceBeforeApproveCart" instance="Bloyal\Calculatecart\Observer\ApproveCart" disabled="false" />
        
        
    </event>
    <event name="sales_order_place_after"> 
		<observer name="salesOrderPlaceAfterRedeemGiftcard" instance="Bloyal\Calculatecart\Observer\RedeemCaptureGiftcard" disabled="false" />
		<observer name="salesOrderPlaceAfterRedeemCapture" instance="Bloyal\Calculatecart\Observer\RedeemCaptureLoyaltyDollar" disabled="false" />
        <observer name="salesOrderPlaceAfterStoredPayment" instance="Bloyal\Calculatecart\Observer\StoredPaymentMethod" disabled="false" />
        <observer name="salesOrderPlaceAfterCommitCart" instance="Bloyal\Calculatecart\Observer\CommitCart" disabled="false" />
    </event>
    <event name="sales_model_service_quote_submit_before">
        <observer name="transferBloyalDiscount" instance="Bloyal\Calculatecart\Observer\AddBloyalDiscountToOrder" />
    </event>
	<event name="payment_method_is_active">
        <observer name="disable_giftcard_payment_tender" instance="Bloyal\Calculatecart\Observer\DisableGiftCardTender" disabled="true"/>
		<observer name="disable_loyaltydollar_payment" instance="Bloyal\Calculatecart\Observer\DisableLoyaltyDollarPM" />
        <observer name="disable_stored_payment_method" instance="Bloyal\Calculatecart\Observer\DisableStoredPaymentMethod" />
    </event>
    <event name="checkout_cart_product_add_after">
        <observer name="CustomPriceObserver" instance="Bloyal\Calculatecart\Observer\CustomPriceObserver" />
    </event>
    <event name="customer_logout">
        <observer name="clear_cart_on_logout" instance="Bloyal\Calculatecart\Observer\ClearCart" />
    </event>
</config>