<?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 id="special_slider" style="overflow-x: clip;">
	<div class="special_list swiped" style="<?= isset($_GET['advertise']) ? "flex-wrap: wrap;" : "" ?>">
		<? foreach($arResult['BANNERS'] AS $banner): ?>
			<div class="special_item" id="program_special_offers_banner_<?= $banner['ID']; ?>">
				<a href="<?= $banner['PROPERTIES']['OFFER']['RELATED']['DETAIL_PAGE_URL']; ?>">
					<span class="special_name"><?= $banner['NAME']; ?></span>
					<span class="special_desc"><?= $banner['PREVIEW_TEXT']; ?></span>
					<span class="special_link">Подробнее</span>
				</a>
				<img src="<?= $banner['PREVIEW_PICTURE']; ?>" alt="<?= $banner['NAME']; ?>"/>
				<? if(!isset($_GET['advertise']) && $banner['PROPERTIES']['ADVERTISING_ERIR']['VALUE']): ?>
					<div class="advblock adv_button_news">Реклама
						<div class="adv_content">ООО "ЛК Эволюция"</div>
						<div class="adv_content">ИНН 9724016636</div>
						<div class="adv_content">erid: <?= $banner['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
					</div>
				<? endif; ?>
			</div>
		<? endforeach; ?>
	</div>

	<? if(count($arResult['BANNERS']) > 2): ?>
		<div class="special_arrows">
			<button class="prev">
				<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="https://www.w3.org/2000/svg">
				<path d="M7 11L1 6L6.25 1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
				</svg>
			</button>
			<button class="next">
				<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="https://www.w3.org/2000/svg">
				<path d="M1 1L7 6L1.75 11" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
				</svg>
			</button>
		</div>
	<? endif; ?>

	<? if(count($arResult['BANNERS']) == 0): ?>
		<div class="disable_space">
	<? endif; ?>
</div>