<?php $_shouldextend[1]=1; ?>

<?php $this->startSection('content'); ?>
 <?php if($collection['count'] == 0): ?>
 <div class="catalog-page flex">
 <?php echo $this->runChild('category.empty'); ?>
 </div>
 <?php else: ?>
 <div x-data="<?php echo \htmlentities(json_encode([
 'count' => $collection['count'],
 'limit' => $limit,
 'page' => $page,
 'offset' => 0,
 'firstLoad' => true,
 ] )??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <div x-data="category">
 <div class="catalog-page flex">
 <div class="filter">
 <form x-bind="form" id="filter-form">
 <a class="mob-link">
 <?php echo \htmlentities(__('site.filters')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </a>

 <div class="main-block">
 <button type="button" x-bind="filtersReset" class="filters-reset">
 <?php echo \htmlentities(__('site.filters_reset')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </button>

 <?php $__currentLoopData = $filters; $this->addLoop($__currentLoopData);$this->getFirstLoop();
 foreach($__currentLoopData as $filter): $loop = $this->incrementLoopIndices();  ?>
 <?php echo $this->runChild('filters.' . $filter['options']['type'], $filter); ?>
 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 </div>
 </form>
 </div>

 <div class="list" x-bind="list">
 <?php echo $this->runChild('category.list', ['items' => $collection['items']]); ?>

 <?php echo $this->runChild('category.listApi'); ?>

 <div class="button">
 <button x-bind="button">
 <?php echo \htmlentities(__('site.show_more')??'', ENT_QUOTES, 'UTF-8', false); ?>

 </button>
 </div>
 
 <?php echo $this->runChild('pagination.outer', ['items' => $pagination]); ?>
 </div>
 </div>
 </div>
 </div>
 <?php endif; ?>
<?php $this->stopSection(); ?>

<?php if (isset($_shouldextend[1])) { echo $this->runChild('layouts.main'); } ?>