@inject ('wishListHelper', 'Webkul\Customer\Helpers\Wishlist')
{!! view_render_event('bagisto.shop.products.wishlist.before') !!}
@auth('customer')
@php
/* search wishlist on the basis of product's id so that wishlist id can be catched */
$wishlist = $wishListHelper->getWishlistProduct($product);
/* link making */
$href = isset($route) ? $route : ($wishlist ? route('shop.customer.wishlist.remove', $wishlist->id) : route('shop.customer.wishlist.add', $product->id));
/* method */
$method = isset($route) ? 'POST' : ( $wishlist ? 'DELETE' : 'POST' );
/* is confirmation needed */
$isConfirm = isset($route) ? 'true' : 'false';
/* title */
$title = $wishlist ? __('velocity::app.shop.wishlist.remove-wishlist-text') : __('velocity::app.shop.wishlist.add-wishlist-text');
@endphp
@if (request()->routeIs('shop.customer.wishlist.index'))