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

/** @var $block \Magento\Checkout\Block\Total\DefaultTotal */
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
?>

<?php
/** @var \Magento\Checkout\Helper\Data $checkoutHelper */
$checkoutHelper = $block->getData('checkoutHelper');
?>
<tr class="totals">
    <th colspan="<?= $block->escapeHtmlAttr($block->getColspan()) ?>"
        class="mark" scope="row">
        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()):?>
            <strong>
        <?php endif; ?>
        <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()):?>
            </strong>
        <?php endif; ?>
    </th>
    <td class="amount"
        data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()):?>
            <strong>
        <?php endif; ?>
            <span>
                <?= $block->escapeHtml(
                    $checkoutHelper->formatPrice($block->getTotal()->getValue()),
                    ['span']
                ) ?>
            </span>
        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()):?>
            </strong>
        <?php endif; ?>
    </td>
</tr>
<?php if ($block->getTotal()->getStyle()): ?>
    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($block->getTotal()->getStyle(), 'tr.totals th.mark') ?>
    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($block->getTotal()->getStyle(), 'tr.totals td.amount') ?>
<?php endif; ?>
