<?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);
?>
    <section data-page="about">
		<div class="container">
			<h1 class="section_title">Часто задаваемые вопросы</h1>
			<div class="aside_container about">
				<aside>
					<ul class="aside_nav">
						<? $c = 0; ?>
						<? foreach($arResult['SECTIONS'] AS $section): ?>
							<li>
								<a class="<?= $c === 0 ? "active" : ""; ?> faq_section_button faq_section_button_<?= $c; ?>" style="cursor: pointer;" data-section="<?= $c; ?>"><?= $section['NAME']; ?></a>
							</li>
							<? $c++; ?>
						<? endforeach; ?>
					</ul>
					<?/*
					<button class="button button-blue">Задать вопрос специалисту</button>
					*/?>
				</aside>
				<article>
					<div class="search_form faq_search">
						<form method="GET" action="/programs/faq/" id="faq_search_form">
							<div class="form_field single">
								<input id="faq_search_form_field" type="search" name="search" placeholder="Поиск" value="<?= $arResult['SEARCH']; ?>" />
								<button id="faq_search_form_clear_button" class="clear" style="display:<?= !empty($arResult['SEARCH']) ? "block" : "none"; ?>;"></button>
							</div>
							<button id="faq_search_form_search_button" class="button primary" >Поиск</button>
							<?/*
							<?= !empty($arResult['SEARCH']) ? "" : "disabled='disabled'"; ?>
							*/?>
						</form>
					</div>
					<? $c = 0; ?>
					<? foreach($arResult['SECTIONS'] AS $section): ?>
						<div class="dropdown_blocks_list faq_items_list faq_items_list_<?= $c; ?>" style="display: <?= $c === 0 ? "block" : "none"; ?>">
							<? $e = 0; ?>
							<? foreach($section['ITEMS'] AS $entry): ?>
								<div class="dropdown_block <?= $e === 0 ? "open" : "" ?> faq_item faq_item_<?= $e; ?>">
									<div class="block_header faq_item_title" data-id="<?= $entry['ID']; ?>" data-index="<?= $e; ?>" data-section="<?= $c; ?>">
										<p><?= $entry['NAME']; ?></p>
										<button class="block_toggle"></button>
									</div>
									<div class="block_body">
										<?= $entry['DETAIL_TEXT']; ?>
									</div>
								</div>
							<? $e++; ?>
							<? endforeach; ?>
						</div>
						<? $c++; ?>
					<? endforeach; ?>
				</article>
			</div>
		</div>
	</div>
</section>