<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
?>
<div class="catalog_sort">
	<div class="sort_container sort_selector">
		<button class="i-sort">Сортировка: 
			<? if($arParams['USED']): ?>
				<?= $arParams['SORT'] === "" || $arParams['SORT'] === null || $arParams['SORT'] === "date" ? "По дате добавления" : ""; ?>
			<? else: ?>
				<?= $arParams['SORT'] === "" || $arParams['SORT'] === null || $arParams['SORT'] === "name" ? "По названию" : ""; ?>
			<? endif; ?>
			<?= $arParams['SORT'] === "low" ? "По минимальной цене" : ""; ?>
			<?= $arParams['SORT'] === "high" ? "По максимальной цене" : ""; ?>
		</button>
		<ul data-position="left">
			<? if($arParams['USED']): ?>
				<li class="sort_option <?= $arParams['SORT'] === "" || $arParams['SORT'] === null || $arParams['SORT'] === "date" ? "active" : ""; ?>" data-value="date">По дате добавления</li>
			<? else: ?>
				<li class="sort_option <?= $arParams['SORT'] === "" || $arParams['SORT'] === null || $arParams['SORT'] === "name" ? "active" : ""; ?>" data-value="name">По названию</li>
			<? endif; ?>
			<li class="sort_option <?= $arParams['SORT'] === "low" ? "active" : ""; ?>" data-value="low">По минимальной цене</li>
			<li class="sort_option <?= $arParams['SORT'] === "high" ? "active" : ""; ?>" data-value="high">По максимальной цене</li>
		</ul>
	</div>
	<? if($arParams['FILTER']): ?>
		<div class="sort_container filter_selector">
			<button class="i-filter">Фильтр</button>
		</div>
	<? endif; ?>
</div>
