<?php
/**
 * Hyvä Themes - https://hyva.io
 * Copyright © Hyvä Themes 2020-present. All rights reserved.
 * This product is licensed per Magento install
 * See https://hyva.io/license
 */

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 flex flex-row flex-wrap -mr-2">
        <?php foreach ($block->getItems() as $item): ?>
            <li data-row="product-item" class="product-item w-full sm:w-1/2 xl:w-1/3 flex"
                id="item_<?= $escaper->escapeHtmlAttr($item->getId()) ?>">
                <div class="product-item-info p-2 card card-interactive mr-2 mb-2 w-full" 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; ?>
