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

<?php if ($block->canDisplayGiftmessage()) : ?>
<div id="gift-message-form-data-<?= (int) $block->getItem()->getId() ?>" class="no-display">
    <form id="<?= $block->escapeHtmlAttr($block->getFieldId('form')) ?>"
          action="<?= $block->escapeUrl($block->getSaveUrl()) ?>">
        <input type="hidden"
               id="<?= $block->escapeHtmlAttr($block->getFieldId('type')) ?>"
               name="<?= $block->escapeHtmlAttr($block->getFieldName('type')) ?>"
               value="order_item" />
        <input type="hidden"
               id="<?= $block->escapeHtmlAttr($block->getFieldId('sender')) ?>"
               name="<?= $block->escapeHtmlAttr($block->getFieldName('sender')) ?>"
               value="<?= $block->escapeHtmlAttr($block->getSender()) ?>" />
        <input type="hidden"
               id="<?= $block->escapeHtmlAttr($block->getFieldId('recipient')) ?>"
               name="<?= $block->escapeHtmlAttr($block->getFieldName('recipient')) ?>"
               value="<?= $block->escapeHtmlAttr($block->getRecipient()) ?>" />
        <input type="hidden"
               id="<?= $block->escapeHtmlAttr($block->getFieldId('message')) ?>"
               name="<?= $block->escapeHtmlAttr($block->getFieldName('message')) ?>"
               value="<?= $block->escapeHtmlAttr($block->getMessageText()) ?>" />
    </form>

    <?php if ($block->getMessageText()) : ?>
    <div class="gift-options-tooltip-content">
        <div><strong><?= $block->escapeHtml(__('Gift Message')) ?></strong>: </div>
        <div><?= /* @noEscape */ $block->getMessageText() ?></div>
    </div>
    <?php endif; ?>
</div>
<?php endif; ?>
