<?xml version="1.0"?>
<!--
/**
 * Mageplaza
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Mageplaza.com license that is
 * available through the world-wide-web at this URL:
 * https://www.mageplaza.com/LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    Mageplaza
 * @package     Mageplaza_RewardPoints
 * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
 * @license     https://www.mageplaza.com/LICENSE.txt
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Mageplaza_Core::css/ion.rangeSlider.css"/>
        <css src="Mageplaza_Core::css/skin/ion.rangeSlider.skinModern.css"/>
    </head>
    <body>
        <referenceContainer name="checkout.cart.methods">
            <block class="Magento\Checkout\Block\Onepage\Link" name="reward.spending.slider" template="Mageplaza_RewardPoints::checkout/cart/spend_points.phtml" after="checkout.cart.shortcut.buttons"/>
        </referenceContainer>
        <referenceBlock name="checkout.cart.totals">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="block-totals" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="reward_label" xsi:type="array">
                                    <item name="component" xsi:type="string">Mageplaza_RewardPoints/js/view/totals/label</item>
                                    <item name="sortOrder" xsi:type="string">0</item>
                                </item>
                                <item name="before_grandtotal" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="reward_discount" xsi:type="array">
                                            <item name="component" xsi:type="string">Mageplaza_RewardPoints/js/view/totals/discount</item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>
