<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
?>
<?php
/** @var \Magento\Catalog\Pricing\Render\ConfiguredPriceBox $block */
$schema = ($block->getZone() == 'item_view');
$idSuffix = $block->getIdSuffix() ?: '';
?>
<?php if ($block->hasSpecialPrice()) : ?>
    <p class="price-as-configured">
        <span class="special-price">
            <?= /* @noEscape */ $block->renderAmount(
                $block->getConfiguredPrice()->getAmount(),
                [
                    'display_label'     => $block->escapeHtml(__('Special Price')),
                    'price_id'          => $block->escapeHtml($block->getPriceId('product-price-' . $idSuffix)),
                    'price_type'        => 'finalPrice',
                    'include_container' => true,
                    'schema' => $schema,
                ]
            ); ?>
        </span>
        <span class="old-price">
            <?= /* @noEscape */ $block->renderAmount(
                $block->getConfiguredRegularPrice()->getAmount(),
                [
                    'display_label'     => $block->escapeHtml(__('Regular Price')),
                    'price_id'          => $block->escapeHtml($block->getPriceId('old-price-' . $idSuffix)),
                    'price_type'        => 'oldPrice',
                    'include_container' => true,
                    'skip_adjustments'  => true,
                ]
            ); ?>
        </span>
    </p>
<?php else : ?>
    <?php
    $priceLabel = ($block->getPriceLabel() !== null)
        ? $block->getPriceLabel()
        : '';
    ?>
    <p class="price-as-configured">
        <?= /* @noEscape */ $block->renderAmount(
            $block->getConfiguredPrice()->getAmount(),
            [
                'display_label'     => $block->escapeHtml($priceLabel),
                'price_id'          => $block->escapeHtml($block->getPriceId('product-price-' . $idSuffix)),
                'price_type'        => 'finalPrice',
                'include_container' => true,
                'schema' => $schema,
            ]
        ); ?>
    </p>
<?php endif; ?>
