<?php
/**
 * Maho
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2021-2024 The OpenMage Contributors (https://openmage.org)
 * @copyright   Copyright (c) 2024 Maho (https://mahocommerce.com)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/** @var Mage_Catalog_Block_Layer_View $this */
?>
<?php if($this->canShowBlock()): ?>
<div class="block block-layered-nav">
    <div class="block-content toggle-content">
        <?= $this->getStateHtml() ?>
        <?php if ($this->getLayer()->getState()->getFilters()): ?>
            <div class="actions"><a href="<?= $this->getClearUrl() ?>"><?= $this->__('Clear All') ?></a></div>
        <?php endif ?>
        <?php if($this->canShowOptions()): ?>
            <p class="block-subtitle block-subtitle--filter"><?= $this->__('Filter') ?></p>
            <dl id="narrow-by-list" class="no-display">
                <?php $_filters = $this->getFilters() ?>
                <?php foreach ($_filters as $_filter): ?>
                <?php if($_filter->getItemsCount()): ?>
                    <dt><?= $this->__($_filter->getName()) ?></dt>
                    <dd><?= $_filter->getHtml() ?></dd>
                <?php endif ?>
                <?php endforeach ?>
            </dl>
        <?php endif ?>
    </div>
</div>
<?php endif ?>
