<?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\Button;

/** @var Escaper $escaper */
/** @var Button $block */
?>

<?php if ($block->getWishlist()->getItemsCount() && $block->getWishlist()->isSalable()): ?>
    <button type="button"
            @click.prevent="addAllItemsToCart()"
            data-role="all-tocart"
            title="<?= $escaper->escapeHtmlAttr(__('Add All to Cart')) ?>"
            class="action tocart btn btn-primary">
        <span><?= $escaper->escapeHtml(__('Add All to Cart')) ?></span>
    </button>
<?php endif;?>
