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

// @codingStandardsIgnoreFile
$showWishlist = $this->helper('Olegnax\Athlete2\Helper\Helper')->getConfig('athlete2_settings/products_listing/wishlist');
/** @var Magento\Wishlist\Block\Catalog\Product\ProductList\Item\AddTo\Wishlist $block */
$icon = '';
$iconfont = $this->helper('Olegnax\Athlete2\Helper\Helper')->getConfig('athlete2_design/appearance_icons/icon_wishlist_fallback');
if(!$iconfont){
    $icon	 = '<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" class="a2-icon-wishlist"><use xlink:href="#a2-wishlist-icon"></use></svg>';
}

?>
<?php if ($block->getWishlistHelper()->isAllow() && $showWishlist): ?>
    <a href="#"
       class="action towishlist"
       title="<?= $block->escapeHtmlAttr(__('Add to Wish List')) ?>"
       aria-label="<?= $block->escapeHtmlAttr(__('Add to Wish List')) ?>"
       data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($block->getProduct()) ?>'
       data-action="add-to-wishlist"
       role="button">
        <?php echo $icon ?>
        <span><?= $block->escapeHtml(__('Add to Wish List')) ?></span>
    </a>
<?php endif; ?>
