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

use Hyva\Theme\Model\ViewModelRegistry;
use Hyva\Theme\ViewModel\LucideIcons;
use Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Remove;
use Magento\Framework\Escaper;
use Magento\Wishlist\Model\Item;

/** @var Remove $block */
/** @var Escaper $escaper */
/** @var ViewModelRegistry $viewModels */

/** @var LucideIcons $lucideIcons */
$lucideIcons = $viewModels->require(LucideIcons::class);

/** @var Item $item */
$item = $block->getItem();
$product = $item->getProduct();
?>

<button
    type="button"
    data-role="remove"
    @click.prevent='hyva.postForm(<?= /* @noEscape */ $block->getItemRemoveParams($block->getItem()) ?>)'
    class="btn p-2"
>
    <?= $lucideIcons->trashHtml('', 20, 20); ?>
    <span class="sr-only">
        <?= $escaper->escapeHtml(__('Remove item %1', $product->getName())) ?>
    </span>
</button>
