{if $body.category.labels_filter!='N'}
   {$body.dynamic_filter.labels = $body.dynamic_filter.filter->getLabels() scope='global'}
{*   {dd($body.dynamic_filter.label)}*}
   {if $body.dynamic_filter.labels and $body.dynamic_filter.labels|count}

      <div {if $focus}class="tab-pane{if !$filterFocusTabIsActive} active{/if}" id="labels" role="tabpanel"
           {else}class="filter-row filter-labels"{/if}>

         {if $filter_openers}
            <button type="button" class="filter-label"
                    data-opener="[data-opener-param-labels]">{t}Štítky{/t}</button>
         {else}
            <p class="filter-label">{t}Štítky{/t}</p>
         {/if}

         <div {if $filter_openers}class="opener-content" data-opener-param-labels{/if}>
            {foreach $body.dynamic_filter.labels as $label}
               {if $label.count == 0}
                  {continue}
               {/if}
               <label class="custom-control custom-checkbox" for="dynamic_filter[labels][{$label.id}]">
                  <input class="custom-control-input" type="checkbox" name="dynamic_filter[labels][{$label.id}]" value="{$label.id}"
                         data-filter-input="labels" id="dynamic_filter[labels][{$label.id}]"
                         {if in_array($label.id, $body.dynamic_filter.filterParams->getLabels())}checked{/if}
                  >
                  <span class="custom-control-indicator"></span>
                  <span class="custom-control-text">
                     {$label.name}
                     <small>(<span class="filter-count" data-filter-count="{$label.id}">{$label.count}</span>)</small>
                  </span>
               </label>
            {/foreach}
         </div>
      </div>
   {/if}
{/if}
