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

// @codingStandardsIgnoreFile

/** @var $block \Magento\Checkout\Block\Cart\Sidebar */
?>
<div class="rd-navbar-cart-wrap">
    <div data-block="minicart" class="minicart-wrapper">
        <div class="rd-navbar-cart-fixed">
            <a class="action showcart rd-navbar-cart-toggle" href="" data-rd-navbar-toggle=".rd-navbar-cart" data-bind="scope: 'minicart_content'">
                <span></span>
                <!-- <span class="text">--><?php /* @escapeNotVerified */ //echo __('My Cart'); ?><!--</span>-->
                <strong class="counter qty empty"
                      data-bind="css: { empty: cart().summary_count == 0 }, blockLoader: isLoading">
                    <strong class="counter-number"><!-- ko text: cart().summary_count --><!-- /ko --></strong>
                    <strong class="counter-label">
                    <!-- ko if: cart().summary_count -->
                        <!-- ko text: $t('items') --><!-- /ko -->
                    <!-- /ko -->
                    </strong>
                </strong>
            </a>
        </div>

        <?php if ($block->getIsNeedToDisplaySideBar()): ?>
            <div data-bind="scope: 'minicart_content'" class="rd-navbar-cart">
            <!-- ko ifnot: cart().summary_count -->
                    <div class="block block-minicart empty">
                        <div id="minicart-content-wrapper">
                            <!-- ko template: getTemplate() --><!-- /ko -->
                        </div>
                    </div>
                <!-- /ko -->
                <!-- ko if: cart().summary_count -->
                    <div class="block block-minicart">
                        <div id="minicart-content-wrapper">
                            <!-- ko template: getTemplate() --><!-- /ko -->
                        </div>
                    </div>
                <!-- /ko --></div>
        <?php endif ?>
        <script>
            window.checkout = <?php /* @escapeNotVerified */ echo \Zend_Json::encode($block->getConfig()); ?>;
        </script>
        <script type="text/x-magento-init">
        {
            "[data-block='minicart']": {
                "Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?>
            },
            "*": {
                "Magento_Ui/js/block-loader": "<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>"
            }
        }
        </script>

    </div>
</div>

