<?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 Hyva\Theme\Model\ViewModelRegistry;
use Hyva\Theme\ViewModel\HeroiconsOutline;
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 HeroiconsOutline $heroicons */
$heroicons = $viewModels->require(HeroiconsOutline::class);

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

<a href="#"
   data-role="remove"
   @click.prevent='hyva.postForm(<?= /* @noEscape */ $block->getItemRemoveParams($block->getItem()) ?>)'
   title="<?= $escaper->escapeHtmlAttr(__('Remove Item')) ?>"
   class="btn-remove border-red-500 action delete btn btn-secondary inline-flex p-2">
    <svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" viewBox="0 0 18 20" fill="none">
        <path d="M1.38672 4.6H3.1645M3.1645 4.6H17.3867M3.1645 4.6V17.2C3.1645 17.6774 3.3518 18.1352 3.6852 18.4728C4.01859 18.8104 4.47078 19 4.94227 19H13.8312C14.3027 19 14.7548 18.8104 15.0882 18.4728C15.4216 18.1352 15.6089 17.6774 15.6089 17.2V4.6M5.83116 4.6V2.8C5.83116 2.32261 6.01846 1.86477 6.35186 1.52721C6.68526 1.18964 7.13745 1 7.60894 1H11.1645C11.636 1 12.0882 1.18964 12.4216 1.52721C12.755 1.86477 12.9423 2.32261 12.9423 2.8V4.6M7.60894 9.1V14.5M11.1645 9.1V14.5" stroke="#B3261E" stroke-linecap="round" stroke-linejoin="round"/>
    </svg>
    <span class="sr-only">
        <?= $escaper->escapeHtml(__('Remove item %1', $product->getName())) ?>
    </span>
</a>
