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

// @codingStandardsIgnoreFile

?>
<?php
/**
 * Currency switcher
 *
 * @see \Magento\Directory\Block\Currency
 */
?>
<?php if ($block->getCurrencyCount() > 1): ?>
    <?php $currencies = $block->getCurrencies(); ?>
    <?php $currentCurrencyCode = $block->getCurrentCurrencyCode(); ?>
    <?php $id = $block->getIdModifier() ? '-' . $block->getIdModifier() : '' ?>
    <div class="switcher currency switcher-currency" id="switcher-currency<?php /* @escapeNotVerified */
    echo $id ?>">
        <strong class="label switcher-label"><span><?php /* @escapeNotVerified */
                echo __('Currency') ?></span></strong>
        <div class="switcher-content">
            <div class="action-switcher" id="switcher-currency-trigger<?php /* @escapeNotVerified */
            echo $id ?>">
                <div class="heading-switcher language-<?php echo $block->escapeHtml($block->getCurrentCurrencyCode()) ?>">
                    <span><?php echo $block->escapeHtml($currentCurrencyCode) ?></span>
                </div>
            </div>

            <div class="dropdown-switcher">
                <ul class="list-item">
                    <?php foreach ($currencies as $_code => $_name): ?>
                        <?php if ($_code != $currentCurrencyCode): ?>
                            <li class="currency-<?php /* @escapeNotVerified */
                            echo $_code ?> switcher-option">
                                <a href="#" data-post='<?php /* @escapeNotVerified */
                                echo $block->getSwitchCurrencyPostData($_code); ?>'><?php /* @escapeNotVerified */
                                    echo $_code ?> - <?php /* @escapeNotVerified */
                                    echo $_name ?></a>
                            </li>
                        <?php endif; ?>
                    <?php endforeach; ?>
                </ul>
            </div>
        </div>
    </div>
<?php endif; ?>
