<? 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 ($arParams['~TEXT']) { ?>
    <section class="prothesis-block block" id="<?= $arParams['SECTION_ID']; ?>">
        <div class="prothesis-block__content container">
            <div class="row">
                <div class="col-12 col-lg-6">
                    <div class="prothesis-block__text-container wrap-container">
                        <h2 class="prothesis-block__title block__title"><?= $arParams['TITLE']; ?></h2>
                        <div class="prothesis-block__text wrap-block" data-wrap-height="176">
                            <?= $arParams['~TEXT']; ?>
                        </div>
                        <div class="wrap-btn"></div>
                    </div>
                </div>
                <div class="col-12 col-lg-6">
                    <div class="prothesis-block__pic-container">
                        <? if ($arParams['IMG']): ?>
                            <div class="prothesis-block__pic pic-wrapper"><img src="<?= $arParams['IMG']; ?>"
                                    alt="<?= $arParams['TITLE']; ?>"></div><? endif; ?>
                        <? if ($arParams['PRICE']): ?>
                            <div class="prothesis-block__pic-sticker"> <span><?= $arParams['~PRICE']; ?></span></div>
                        <? endif; ?>
                    </div>
                </div>
            </div>
            <?
            /*
            <? if ($arResult['MENU_ITEMS']): ?>
                    <div class="row prothesis-block__items">
                        <? foreach ($arResult['MENU_COLUMNS'] as $columnKey => $columnValue): ?>
                        <div class="col-12 col-lg-4">
                            <div class="prothesis-block__item <?= ($columnKey == 1 ? 'has-pic' : ''); ?>">
                                <ul class="prothesis-block__item-list">
                                    <? foreach ($columnValue as $elemKey => $elemValue): ?>
                                    <li><a href="<?= ($elemValue['PROPERTIES']['CUSTOM_LINK']['VALUE'] ?: $elemValue['DETAIL_PAGE_URL']); ?>"><?= $elemValue['NAME']; ?></a></li>
                                    <? endforeach; ?>
                                </ul>
                                <? if ($columnKey == 1): ?>
                                <div class="prothesis-block__item-pic pic-wrapper">
                                    <img src="/local/templates/DoctorSmile_2022/img/service/2.png" alt="<?= $arParams['TITLE']; ?>">
                                </div>
                                <? endif; ?>
                            </div>
                        </div>
                        <? endforeach; ?>
                    </div>
                    <? endif; ?>
                    */
            ?>
        </div>
        <? if ($arParams['LIST']): ?>
            <div class="new-serviceitems">
                <div class="container">
                    <h2 class="prothesis-block__title block__title">категории</h2>
                    <div class="new-serviceitems__items">
                        <? foreach ($arParams['LIST'] as $stageKey => $stageValue): ?>
                            <div class="new-serviceitems__item">
                                <div class="new-serviceitems__head">
                                    <? echo $stageValue; ?>
                                </div>
                                <ul class="new-serviceitems__list">
                                    <?= $arParams['~LIST_LINKS' . $stageKey]; ?>
                                </ul>
                            </div>
                        <? endforeach; ?>
                    </div>
                </div>
            </div>
        <? endif; ?>
    </section>
<? } ?>

<?
global $pricesFilter;
$pricesFilter = ['ID' => $arResult['ID']];
?>
<? $APPLICATION->IncludeComponent(
    "bitrix:catalog.section.list",
    "prices",
    array(
        "ADD_SECTIONS_CHAIN" => "Y",
        "CACHE_FILTER" => "N",
        "CACHE_GROUPS" => "Y",
        "CACHE_TIME" => "36000000",
        "CACHE_TYPE" => "A",
        "COUNT_ELEMENTS" => "N",
        "COUNT_ELEMENTS_FILTER" => "CNT_ACTIVE",
        "FILTER_NAME" => "pricesFilter",
        "IBLOCK_ID" => $arParams['IBLOCK_ID'],
        "IBLOCK_TYPE" => $arParams['IBLOCK_TYPE'],
        "SECTION_CODE" => "",
        "TITLE" => "Стоимость",
        "SECTION_FIELDS" => array(
            0 => "",
            1 => "",
        ),
        "SECTION_ID" => 0,
        "SECTION_URL" => "",
        "SECTION_USER_FIELDS" => array(
            0 => "UF_PRICES",
            1 => "",
        ),
        "SHOW_PARENT_NAME" => "Y",
        "TOP_DEPTH" => "2",
        "VIEW_MODE" => "LINE",
        "COMPONENT_TEMPLATE" => "prices",
        "SUB_TITLE_DONT_SHOW" => "Y",
    ),
    $component
); ?>