<?php
/** @var \Magento\Wishlist\Block\Customer\Wishlist\Item\Column\Cart $block */
/** @var \Magento\Wishlist\Model\Item $item */
/** @var \Magetop\Advancepreview\Helper\ProductHelper $previewProductHelper */
$previewProductHelper = $this->helper('Magetop\Advancepreview\Helper\ProductHelper');
$item = $block->getItem();
$product = $item->getProduct();
$infoRequest =  $item->getBuyRequest()->getData();
$txtInfoRequest = count($infoRequest) ? json_encode($infoRequest) : '{}';
$isStock = $previewProductHelper->checkIsInStock($product->getId());
?>
<input type="hidden" id="txt-preview-wishlist-<?php echo $item->getId() ?>" name="preview_wishlist_<?php echo $item->getId() ?>" value="<?php echo htmlentities($txtInfoRequest) ?>">
<button type="button" class="btn-custom-add-to-cart" custom-url="<?php echo $item->getProductUrl() ?>?offer_id=<?php echo $item->getId(); ?>" style="display: none;" id="btn-custom-add-to-cart-<?php echo $item->getId(); ?>"><?php echo __('Add to cart') ?></button>
<button type="button" class="btn-preview-add-item-to-order" data-post='<?= /* @noEscape */ $block->getItemAddToCartParams($item) ?>' title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>" style="display: none;" id="btn-custom-add-to-cart-wishlist-<?php echo $item->getId(); ?>" <?php if(!$isStock) { ?> disabled="disabled" <?php } ?>><?php echo __('Place order') ?></button>
<button type="button" class="btn-preview-add-item-to-order" item-id="<?php echo $item->getId(); ?>" product-id="<?php echo $item->getProductId(); ?>" id="btn-preview-add-item-to-order-<?php echo $item->getId(); ?>" <?php if(!$isStock) { ?> disabled="disabled" <?php } ?>><?php echo __('Place order') ?></button>
<a href="#" class="btn-preview-request-offer-again" item-id="<?php echo $item->getId(); ?>" product-id="<?php echo $item->getProductId(); ?>" id="btn-preview-request-offer-again-<?php echo $item->getId(); ?>" <?php if(!$isStock) { ?> disabled="disabled" <?php } ?>><?php echo __('Get offer again') ?></a>
