<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
?>
<?php /** @var $block \Magento\Downloadable\Block\Sales\Order\Email\Items\Order\Downloadable */ ?>
<?php $_item = $block->getItem() ?>
<?php $_order = $block->getItem()->getOrder() ?>
<tr>
    <td class="item-info has-extra">
        <p class="product-name"><?= $block->escapeHtml($_item->getName()) ?></p>
        <p class="sku"><?= $block->escapeHtml(__('SKU')) ?>: <?= $block->escapeHtml($block->getSku($_item)) ?></p>
        <?php if ($block->getItemOptions()) : ?>
        <dl>
            <?php foreach ($block->getItemOptions() as $option) : ?>
            <dt><strong><em><?= $block->escapeHtml($option['label']) ?></em></strong></dt>
            <dd><?= $block->escapeHtml($option['value']) ?></dd>
            <?php endforeach; ?>
        </dl>
        <?php endif; ?>
        <?php if ($links = $block->getLinks()->getPurchasedItems()) : ?>
        <dl>
            <dt><strong><em><?= $block->escapeHtml($block->getLinksTitle()) ?></em></strong></dt>
            <?php foreach ($links as $link) : ?>
                <dd>
                    <?= $block->escapeHtml($link->getLinkTitle()) ?>&nbsp;
                    (<a href="<?= $block->escapeUrl($block->getPurchasedLinkUrl($link)) ?>"><?= $block->escapeHtml(__('download')) ?></a>)
                </dd>
            <?php endforeach; ?>
        </dl>
        <?php endif; ?>
        <?= $block->escapeHtml($_item->getDescription()) ?>
        <?php if ($_item->getGiftMessageId() && $_giftMessage = $this->helper(Magento\GiftMessage\Helper\Message::class)->getGiftMessage($_item->getGiftMessageId())) : ?>
            <table class="message-gift">
                <tr>
                    <td>
                        <h3><?= $block->escapeHtml(__('Gift Message')) ?></h3>
                        <strong><?= $block->escapeHtml(__('From:')) ?></strong> <?= $block->escapeHtml($_giftMessage->getSender()) ?>
                        <br /><strong><?= $block->escapeHtml(__('To:')) ?></strong> <?= $block->escapeHtml($_giftMessage->getRecipient()) ?>
                        <br /><strong><?= $block->escapeHtml(__('Message:')) ?></strong>
                        <br /><?= $block->escapeHtml($_giftMessage->getMessage()) ?>
                    </td>
                </tr>
            </table>
        <?php endif; ?>
    </td>
    <td class="item-qty"><?= (float)$_item->getQtyOrdered() * 1 ?></td>
    <td class="item-price">
        <?= /* @noEscape */ $block->getItemPrice($_item) ?>
    </td>
</tr>
