<?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);
?>
<? if(count($arResult['MODELS']) > 0): ?>
	<? foreach($arResult['MODELS'] AS $model): ?>
		<? if(count($model['ITEMS']) > 0): ?>
			<h2 class="catalog_h2_title"><?= $model['BRAND_NAME']; ?> <?= $model['NAME']; ?></h2>
			<div id="list" class="catalog_list">
				<? foreach($model['ITEMS'] AS $arItem): ?>
					<div class="catalog_item catalog_item_with_button">
						<a href="/car/<?= $arItem['CODE']; ?>/" class="item_link" area-label="<?= $arItem['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> <?= $arItem['PROPERTIES']['MODEL']['RELATED']['NAME']; ?>"></a>
						<img src="<?= $arItem['PROPERTIES']['IMAGE_URL']['VALUE']; ?>" alt="<?= $arItem['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> <?= $arItem['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> <?= $arItem['PROPERTIES']['BODY']['VALUE']; ?>" />
						<p class="item_class"><?= $arItem['PROPERTIES']['BRAND']['RELATED']['NAME']; ?> <?= $arItem['PROPERTIES']['MODEL']['RELATED']['NAME']; ?> <?= $arItem['PROPERTIES']['BODY']['VALUE']; ?></p>
						<p class="item_model">
							<b><?= $arItem['PROPERTIES']['MODIFICATION']['RELATED']['PROPERTIES']['TITLE']['VALUE']; ?></b>
							<?= $arItem['PROPERTIES']['ENGINE_FUEL']['VALUE']; ?>, <?= $arItem['PROPERTIES']['GEAR']['VALUE']; ?>, <?= $arItem['PROPERTIES']['ENGINE_POWER']['VALUE']; ?> л.с.
						</p>
						<ul>
							<li class="pay">
								<p>Ежемесячный платёж (от)</p>
								<p><?= $arItem['CALCULATION']['MONTHLY']; ?> р.</p>
							</li>
							<li>
								<p>Стоимость автомобиля (от)</p>
								<p><?= number_format($arItem['PROPERTIES']['PRICE']['VALUE'], 0, ".", " "); ?> р.</p>
							</li>
							<li>
								<p>Экономия по налогу на прибыль (до)</p>
								<p><?= $arItem['CALCULATION']['SAVINGS_TAX']; ?> р.</p>
							</li>
							<li>
								<p>НДС к возмещению из бюджета (до)</p>
								<p><?= $arItem['CALCULATION']['SAVINGS_VAT']; ?> р.</p>
							</li>
						</ul>
						<div class="item_footer">
							<span class="button button-blue">Рассчитать график</span>
						</div>
						<p></p>
					</div>
				<? endforeach; ?>
			</div>
			<a class="catalog_show_more_button" href="<?= $model['PROPERTIES']['REGIONS']['VALUE'] !== "Да" ? "/catalog/" : $arParams['PATH']; ?><?= $model['BRAND_CODE']; ?>/<?= $model['CODE']; ?>/" style="cursor:pointer;">
				<span>Показать еще</span>
			</a>
		<? endif; ?>
	<? endforeach; ?>
<? endif; ?>