<?php
/**
 * Hyvä Themes - https://hyva.io
 * Copyright © Hyvä Themes. All rights reserved.
 * See COPYING.txt for license details.
 */

use Magento\Framework\Escaper;
use Magento\Wishlist\Block\Customer\Wishlist\Items;

/** @var Escaper $escaper */
/** @var Items $block */
$columns = $block->getColumns();
?>

<div class="products-grid wishlist">
    <?php if (count($block->getItems())): ?>
    <ol role="list" class="product-items grid gap-4 grid-cols-1 md:grid-cols-2 xl:grid-cols-3">
        <?php foreach ($block->getItems() as $item): ?>
            <li
                id="item_<?= $escaper->escapeHtmlAttr($item->getId()) ?>"
                data-row="product-item"
                class="product-item"
            >
                <div class="product-item-info card card-interactive" data-container="product-grid">
                    <?php foreach ($columns as $column): ?>
                        <?= $column->setItem($item)->toHtml();?>
                    <?php endforeach; ?>
                </div>
            </li>
        <?php endforeach; ?>
    </ol>
    <?php else: ?>
        <div class="message info empty">
            <span><?= $escaper->escapeHtml(__('This Wish List has no Items')) ?></span>
        </div>
    <?php endif; ?>
</div>

<?php foreach ($columns as $column): ?>
    <?= $column->getAdditionalHtml() ?>
<?php endforeach; ?>
