{$filterItem = $parameter.name|strip_accent}
{$total_filters = $total_filters + 1 scope='global'}
<div class="filter-row filter-params filter-{$filterItem} filter-id-{$id_parameter}">
   <input type="hidden" name="dynamic_filter[parameters][{$id_parameter}][type]" value="{$parameter.value_type}"
          data-filter-input="{$filterItem}">

   <button type="button" class="filter-label" data-opener="[data-opener-param-{$id_parameter}]">{if $id_parameter == 29}{t}Kategorie{/t}{else}{$parameter.name}{/if}</button>
   <div class="opener-content" data-opener-param-{$id_parameter}>
      <div class="opener-content-inner filter-scrollbar" data-tracking-click="{['target'=>$filterItem]|json_encode}">
         {if $parameter.value_type == "list" or $parameter.value_type == "char"}
            {foreach $parameter.values as $value}
               <label class="custom-control custom-checkbox check-{$value.id}" for="filter_params[{$id_parameter}][{$value.id}]">
                  <input type="checkbox" name="dynamic_filter[parameters][{$id_parameter}][value][]" value="{$value.id}"
                         class="custom-control-input" id="filter_params[{$id_parameter}][{$value.id}]" data-filter-input="{$filterItem}"
                          {if $dbcfg.analytics.google_tag_manager.gtm_dl_version == '2'}
                             data-tracking-filter="{['event'=>'applyFilterParams','filtrName'=>$parameter.name,'filtrId'=>$id_parameter,'filtrValue'=>['name'=>$value.name,'id'=>$value.id,'value'=>'','min'=>'','max'=>'','active'=>'']]|json_encode}"
                          {/if}
                         >
                  <span class="custom-control-indicator"></span>
                  <span class="custom-control-text">
                     {$value.name}{if $value.unit} {$value.unit}{/if}
                     <small>(<span class="filter-count" data-filter-count="{$value.id}">{$value.count}</span>)</small>
                  </span>
               </label>
            {/foreach}
         {elseif $parameter.value_type == "float" and $parameter.values.range.min < $parameter.values.range.max}
            <div class="filter-param-float">
               <input type="text" id="{$filterItem}" name="dynamic_filter[parameters][{$id_parameter}][value]" class="form-control"
                      data-filter-input="{$filterItem}">
               <div class="filter-param-float-inner">
                  <div data-filter-range="{$filterItem}"></div>
               </div>
            </div>
         {else}
            {t}Neznámý typ parametru{/t}
         {/if}
      </div>
   </div>
</div>
