<div class="modal-container d-none">

	<div class="modal-courses" id="coursesModal">
		<div class="modal-courses__inner">

			<div class="modal-courses__info">

			</div>

			<div class="modal-courses__form-container">
				<form class="form validation_js" action="{$GLOBAL_URL}/ajax-course" method="post" id="course">
                    {include file="form/captcha.tpl"}
					<div class="d-none">
						<input class="courses-job-field_js not-empty not-valid" type="text" name="feedback[course]">
					</div>

					<div class="input">
						<label class="input__label" for>Ф.И.О</label>
						<input type="text" name="feedback[fullName]" data-empty="Обязательно для заполнения">
					</div>

					<div class="input">
						<label class="input__label" for>Телефон</label>
						<input class="phone_js" type="tel" name="feedback[phone]" data-empty="Обязательно для заполнения">
					</div>

					<div class="input">
						<label class="input__label" for>E-mail</label>
						<input class="email_js" type="email" name="feedback[email]" data-empty="Обязательно для заполнения" data-empty-email="Введите E-mail корректно">
					</div>

                    {fetch_section assign=oznakomlenSection section=7}{if $oznakomlenSection.status eq 'V'}
					<div class="checkbox">
						<label class="checkbox__label">
							<input class="checkbox__input" type="checkbox">
							<span class="checkbox__content">
								<svg width="17" height="13" viewBox="0 0 17 13" fill="none" xmlns="http://www.w3.org/2000/svg">
									<path d="M15.0806 0L5.75806 9.20833L1.91935 5.41667L0 7.3125L5.75806 13L17 1.89583L15.0806 0Z" fill="white" />
								</svg>
							</span>
							<p>{$oznakomlenSection.name} <a href="{$SITE_URL}{$oznakomlenSection.url}">{$oznakomlenSection.alias}</a></p>
						</label>
					</div>
                    {/if}
					<input type="hidden" name="feedback[subject]"  value="Заявка на курс">
					<button class="btn accent-2 full" type="submit">Подать заявку</button>
				</form>
			</div>

		</div>
	</div>

    {* Наши менторы - модальное окно описание *}
    {fetch_section assign=mentorsSection section=4}{if $mentorsSection.status eq 'V'}
        {fetch_articles limit=40 assign=mentors image=true section=$mentorsSection.sectionId}
        {foreach from=$mentors item=mentor}
			<div class="modal-mentor" id="mentor_{$mentor.articleId}">
				<div class="modal-mentor__inner">
					<div class="modal-mentor__img"><img src="{$mentor.image.original}" alt="{$mentor.title|strip_tags}"></div>
					<div class="modal-mentor__info">
						<ul>
							<li>{$mentor.title nofilter}</li>
							<li>{$mentor.alias nofilter}</li>
						</ul>
						<div class="text-tmp">{$mentor.summary nofilter}</div>
					</div>
				</div>
			</div>
		{/foreach}
	{/if}
    {* /Наши менторы - модальное окно описание *}

</div>

<footer class="footer">
	<div class="flex:col-max">
		<div class="footer__inner">
            {logo link=true classLink="footer__logo" logoUrl="{$ASSETS_URL}/images/logo/logo.png"}
			<nav class="footer__nav">
				<ul>
                    {fetch_sections assign=footerMenus status="V" footerMenu=1 level=1}
                    {foreach item=footerMenu from=$footerMenus name=footerMenus}
					<li><a href="{if !empty($footerMenu.externalLink)}{$footerMenu.externalLink}{else}{$SITE_URL}#{$footerMenu.fileName}{/if}">{$footerMenu.alias}</a></li>
					{/foreach}
				</ul>
			</nav>

			<div class="social white">{include file="modules/socials.tpl"}</div>
		</div>

		<div class="footer__copy">
			<div class="footer__copy-item"><p>© {$config.website_name} {$smarty.now|date_format:"%Y"}</p></div>
			<div class="footer__copy-item"><a href="https://www.life-style.uz/" title="Создание и поддержка сайтов в Ташкенте" target="_blank">Создание сайтов - <i>Life Style</i></a></div>
		</div>

	</div>
</footer>
<script src="{$ASSETS_URL}/js/vendor/jquery.min.js"></script>
<script src="{$ASSETS_URL}/js/vendor/fancybox.js"></script>
<script src="{$ASSETS_URL}/js/vendor/swiper-bundle.min.js"></script>


<script src="{$ASSETS_URL}/js/main.js{if !$config.compress_js_css}?v{$smarty.now|date_format:"%s"}{/if}"></script>
<script type="module" src="{$ASSETS_URL}/js/moduls/moduls.js" async></script>

{if isset($section) && $section.sectionId eq 1}
<script src="https://api-maps.yandex.ru/2.1/?apikey={$maps.api_key}&lang={$config.website_language}" type="text/javascript"></script>
<script type="text/javascript">
    ymaps.ready(init);

    function init() {
        const mapNode = document.querySelector('#map')

        if (window.innerWidth > 1366) {
            if (mapNode) {
                let createAtention = document.createElement('div')
                createAtention.classList.add('map-atention')
                createAtention.textContent = "Для масштабирования карты используйте Shift + Scroll"

                mapNode.insertAdjacentElement('beforeend', createAtention)
                mapNode.addEventListener('mouseover', (e) => createAtention.classList.add('hide'))

                mapNode.addEventListener('mouseleave', (e) => createAtention.classList.remove('hide'))
            }
        }

        let arrCords = [
            [{$maps.coordinates}],
        ]

        let arrText = [
            ["{$config.address}"],
        ]

        var sizeZoom = {$maps.zoom}

        if (window.innerWidth < 768) {
            sizeZoom = 12
        }

        var myMap = new ymaps.Map("map", { center: [{$maps.coordinates}], zoom: sizeZoom, controls: [] }, { suppressMapOpenBlock: true }),
	        myGeoObject = new ymaps.GeoObject();

        if (window.innerWidth > 1366) {
            myMap.behaviors.disable('scrollZoom');
            myMap.events.add('wheel', function (e) {

                if (e.get('shiftKey')) {
                    var delta = e.get('delta');
                    var newZoom = myMap.getZoom() + (delta > 0 ? 1 : -1);
                    myMap.setZoom(newZoom, {
                        checkZoomRange: true
                    });
                }
            });
        }

        for (let index = 0; index < arrCords.length; index++) {
            const element = arrCords[index];
            const text = arrText[index];

            myMap.geoObjects.add(myGeoObject).add(new ymaps.Placemark([element[0], element[1]],
	            { balloonContentHeader: text[0], balloonContentBody: text[1],},
	            { preset: 'islands#icon', iconCaptionMaxWidth: '30', iconColor: '#0e1f31',}
	            )
            ).events
                .add('balloonopen', function (e) {
                    e.get('target').options.set('iconImageHref', 'images/icon/baloon2.png');
                })
                .add('balloonclose', function (e) {
                    e.get('target').options.set('iconImageHref', 'images/icon/baloon.png');
                });
        }
    }
</script>
{/if}

{if isset($config.yandex_metrika) && !empty($config.yandex_metrika)}
    {yandex_metrika code=$config.yandex_metrika}
{/if}
{if isset($config.google_analytics) && !empty($config.google_analytics) }
    {google_analytics code=$config.google_analytics}
{/if}

</body>

</html>


