<commit_before><?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

use Magento\Reward\Block\Checkout\Payment\Additional;
use Magento\Framework\Escaper;
use Magento\Reward\Helper\Data as RewardHelper;

// phpcs:disable Magento2.Files.LineLength
// phpcs:disable Magento2.Templates.ThisInTemplate

/**
 * @var Additional $block
 * @var Escaper $escaper
 */
?>
<?php if ($block->getCanUseRewardPoints()): ?>
    <?php
    $url = $block->getUrl('magento_reward/cart/change');
    $count = $this->helper(RewardHelper::class)->formatReward($block->getPointsBalance(), $block->getCurrencyAmount());
    ?>
    <div class="checkout multishipping payment additional rewardpoints" id="reward-block">
        <div class="field choice payment">
            <input type="checkbox" name="payment[use_reward_points]" value="1"
                   id="use-reward-points"
                   data-mage-init='{"multiShippingBalance":{
                        "changeUrl":"<?= $escaper->escapeJs($escaper->escapeUrl($url)) ?>"
                   }}'
                    <?= $block->useRewardPoints() ? ' checked="checked"' : '' ?> class="checkbox" />
            <label for="use-reward-points" class="label">
                <span>
                    <?= $escaper->escapeHtml(__('Use your reward points; %1 are available.', $count), ['span']) ?>
                </span>
            </label>
        </div>
    </div>
<?php endif; ?><commit_msg>#86704 - fix rewards checkbox<commit_after><?php
use Magento\Reward\Block\Checkout\Payment\Additional;
use Magento\Framework\Escaper;
use Magento\Reward\Helper\Data as RewardHelper;

// phpcs:disable Magento2.Files.LineLength
// phpcs:disable Magento2.Templates.ThisInTemplate

/**
 * @var Additional $block
 * @var Escaper $escaper
 */
?>
<?php if ($block->getCanUseRewardPoints()): ?>
    <?php
    $url = $block->getUrl('magento_reward/cart/change');
    $count = $this->helper(RewardHelper::class)->formatReward($block->getPointsBalance(), $block->getCurrencyAmount());
    ?>
    <div
        class="
            checkout
            multishipping
            payment
            additional
            rewardpoints
        "
        id="reward-block"
    >
        <div class="checkbox choice payment">
            <input
                type="checkbox"
                name="payment[use_reward_points]"
                value="1"
                id="use-reward-points"
                data-mage-init='{
                    "multiShippingBalance": {
                        "changeUrl":"<?= $escaper->escapeJs($escaper->escapeUrl($url)) ?>"
                    }
                }'
                <?= $block->useRewardPoints() ? 'checked="checked"' : '' ?>
                class="checkbox__field"
            />
            <svg
                class="
                    checkbox__icon
                    checkbox__icon--checked
                "
                role="presentation"
                focusable="false"
            >
                <use href="<?= $block->escapeUrl($block->getViewFileUrl('images/icons-sprite.svg#checked')) ?>"></use>
            </svg>
            <svg
                class="
                    checkbox__icon
                    checkbox__icon--unchecked
                "
                role="presentation"
                focusable="false"
            >
                <use href="<?= $block->escapeUrl($block->getViewFileUrl('images/icons-sprite.svg#unchecked')) ?>"></use>
            </svg>
            <label
                for="use-reward-points"
                class="checkbox__label"
            >
                <?= $escaper->escapeHtml(__('Use your reward points; %1 are available.', $count), ['span']) ?>
            </label>
        </div>
    </div>
<?php endif; ?>
{'fraction_non_alphanumeric': 0.1498028909329829, 'fraction_numerical': 0.003416557161629435, 'mean_word_length': 1.8616541353383458, 'pattern_counts': {'":': 4, '<': 43, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5030416', 'n_tokens_mistral': 1088, 'n_tokens_neox': 1047, 'n_words': 175}