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

// @codingStandardsIgnoreFile

/* @var $block \Magento\Wishlist\Block\Customer\Sidebar */
?>
<?php
$wishlistHelper = $this->helper('Magento\Wishlist\Helper\Data');
?>
<?php if ($wishlistHelper->isAllow()) : ?>
    <div class="block block-wishlist" data-bind="scope: 'wishlist'">
		<button id="close-wishlist-site" class="close-wishlist-site"><span class="icon-cross2"></span></button>
		<!-- ko if: wishlist().counter -->
			<div class="block-content">
                <ol class="product-items no-display" id="wishlist-sidebar" data-bind="foreach: wishlist().items, css: {'no-display': null}">
                    <li class="product-item">
                        <div class="product-item-info">
                            <a class="product-item-photo" data-bind="attr: { href: product_url, title: product_name }">
                                <!-- ko template: {name: $data.image.template, data: $data.image} --><!-- /ko -->
                            </a>
                            <div class="product-item-details">
                                <strong class="product-item-name">
                                    <a data-bind="attr: { href: product_url }" class="product-item-link">
                                        <span data-bind="text: product_name"></span>
                                    </a>
                                </strong>
                                <div data-bind="html: product_price"></div>
                                <div class="product-item-actions">
                                    <!-- ko if: product_is_saleable_and_visible -->
                                    <div class="actions-primary">
                                        <!-- ko if: product_has_required_options -->
                                        <a href="#" data-bind="attr: {'data-post': add_to_cart_params}" class="action tocart primary btn-xs"><span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span></a>
                                        <!-- /ko -->
                                        <!-- ko ifnot: product_has_required_options -->
                                            <button type="button" class="action tocart primary btn-xs" data-bind="attr: {'data-post': add_to_cart_params}"><span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span></button>
                                        <!-- /ko -->
                                    </div>
                                    <!-- /ko -->
                                    <div class="actions-secondary">
                                        <a href="#"  data-bind="attr: {'data-post': delete_item_params}"
                                           title="<?php /* @escapeNotVerified */ echo __('Remove This Item') ?>"
                                           class="btn-remove action delete">
                                            <span><?php /* @escapeNotVerified */ echo __('Remove This Item') ?></span>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>
                </ol>
                <div class="actions-toolbar no-display" data-bind="css: {'no-display': null}">
                    <div class="primary">
                        <a class="action primary btn btn-dark btn-full details"
                           href="<?php /* @escapeNotVerified */ echo $this->helper('Magento\Wishlist\Helper\Data')->getListUrl() ?>"
                           title="<?php /* @escapeNotVerified */ echo __('View All Wish List') ?>"><span><?php /* @escapeNotVerified */ echo __('View All Wish List') ?></span></a>
                    </div>
                </div>
        </div>
		<!-- /ko -->
		 <!-- ko ifnot: wishlist().counter -->
			<div class="block-content empty">
				<div class="empty"><?php /* @escapeNotVerified */ echo __('You have no items in your wish list.') ?></div>
			</div>
		<!-- /ko -->
    </div>
<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "wishlist": {
                        "component": "Magento_Wishlist/js/view/wishlist"
                    }
                }
            }
        }
    }
</script>
<?php endif ?>
