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

// @codingStandardsIgnoreFile
?>
<?php
$_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
$show_compare_link = $_portohelper->getConfig('porto_settings/header/compare_link');
$class = "";
if(!isset($show_compare_link) || !$show_compare_link) {
	$class = "hide";
}
?>
<li class="item link compare <?php echo $class; ?>" data-bind="scope: 'compareProducts'" data-role="compare-products-link">
    <a class="action compare" title="<?php echo __('Compare Products') ?>"
       data-bind="attr: {'href': compareProducts().listUrl}, css: {'': !compareProducts().count}"
    >
    	<em class="porto-icon-chart hidden-xs"></em>
        <?php echo __('Compare') ?>
        (<span class="counter qty" data-bind="text: compareProducts().countCaption"></span>)
    </a>
</li>
<script type="text/x-magento-init">
{"[data-role=compare-products-link]": {"Magento_Ui/js/core/app": <?php echo $block->getJsLayout();?>}}
</script>
