{block name='snippets-filter-manufacturer'}
    {et_isShopVersionAtLeast value="5.5.0-rc.1" assign='shopIsAtLeast55'}
    {et_isShopVersionAtLeast value="5.7.0-rc.3" assign='shopIsAtLeast57'}
    {$autoScrollTarget=$autoScrollTarget|default:''}
    {$limit = $limit|default:-1}
    {$collapseInit = false}
    {$lazyLoadImages=$lazyLoadImages|default:true}
    {if $Einstellungen.navigationsfilter.hersteller_anzeigen_als === 'B'}
        <ul class="nav nav-filter-has-image">
    {/if}
    {foreach $filter->getOptions() as $filterOption}
        {assign var=filterIsActive value=$filterOption->isActive() || $NaviFilter->getFilterValue($filter->getClassName()) === $filterOption->getValue()}
        {if $limit != -1 && $filterOption@iteration > $limit && !$collapseInit}
            {block name='snippets-filter-manufacturer-more-top'}
                <div class="collapse{if $filter->isActive()} show{/if}" id="box-collps-filter{$filter->getNiceName()}">
                    <ul class="nav {if $Einstellungen.navigationsfilter.hersteller_anzeigen_als !== 'B'}flex-column{/if}">
                {$collapseInit = true}
            {/block}
        {/if}
        {block name='snippets-filter-manufacturer-item'}
            {$href = "{if !empty($filterOption->getURL())}{$filterOption->getURL()}{if !empty($autoScrollTarget)}{$autoScrollTarget}{/if}{else}#{/if}"}
            <a
                {if $shopIsAtLeast57 && $Einstellungen.prgpattern.prg_pattern_enabled !== 'N'}
                    data-prg-href="{$href|default:''|base64_encode}"
                    href="#"
                {else}
                    href="{$href}"
                {/if}
                title="{$filterOption->getName()|escape:'html'}: {$filterOption->getCount()}{if $shopIsAtLeast55} {lang key='productsFound'}{/if}"
                {if $Einstellungen.navigationsfilter.hersteller_anzeigen_als == 'B'}
                    data-toggle="tooltip"
                    data-placement="top"
                    data-boundary="window"
                {/if}
                class="nav-link filter-item{if $filterOption->isActive()} active{/if}"
                rel="nofollow"
            >
                <div class="box-link-wrapper">
                    {if $Einstellungen.navigationsfilter.hersteller_anzeigen_als == 'B'}
                        {block name='snippets-filter-manufacturer-item-image'}
                            {image lazy=$lazyLoadImages webp=true
                                alt=$filterOption->getName()|escape:'html'
                                src=$filterOption->getData('cBildpfadKlein')
                                class="vmiddle filter-img"
                            }
                            <span class="d-none filter-item-value">{$filterOption->getName()}</span>
                        {/block}
                    {elseif $Einstellungen.navigationsfilter.hersteller_anzeigen_als === 'BT'}
                        {block name='snippets-filter-manufacturer-item-image-text'}
                            {image lazy=$lazyLoadImages webp=true
                                alt=$filterOption->getName()|escape:'html'
                                src=$filterOption->getData('cBildpfadKlein')
                                class="vmiddle filter-img"
                            }
                            <span class="et-filter-option-name filter-item-value">{$filterOption->getName()}</span>
                            <span class="badge badge-outline-secondary">{$filterOption->getCount()}{if $shopIsAtLeast55}<span class="sr-only"> {lang key='productsFound'}</span>{/if}</span>
                        {/block}
                    {elseif $Einstellungen.navigationsfilter.hersteller_anzeigen_als === 'T'}
                        {block name='snippets-filter-manufacturer-item-text'}
                            <i class="{if $filterIsActive === true}{et_getIcon key="filterActive"}{else}{et_getIcon key="filterInactive"}{/if} snippets-filter-item-icon-right"></i>
                            <span class="et-filter-option-name filter-item-value">{$filterOption->getName()}</span>
                            <span class="badge badge-outline-secondary">{$filterOption->getCount()}{if $shopIsAtLeast55}<span class="sr-only"> {lang key='productsFound'}</span>{/if}</span>
                        {/block}
                    {/if}
                </div>
            </a>
        {/block}
    {/foreach}
    {if $limit != -1 && count($filter->getOptions()) > $limit}
        {block name='snippets-filter-manufacturer-more-bottom'}
                </ul>
            </div>
            <div class="snippets-filter-show-all">
                <button
                    class="btn btn-link"
                    role="button"
                    data-toggle="collapse"
                    data-target="#box-collps-filter{$filter->getNiceName()}"
                    aria-expanded="{if $filter->isActive()}true{else}false{/if}"
                    aria-controls="box-collps-filter{$filter->getNiceName()}"
                >
                    {lang key='showAll'}
                </button>
            </div>
        {/block}
    {/if}
    {if $Einstellungen.navigationsfilter.hersteller_anzeigen_als === 'B'}
        </ul>
    {/if}
{/block}
