<footer class="footer">
	
	{fetch_sections assign=footerMenus status="V" footerMenu=1 level=1}
	
	<div class="flex:col-max">

		<div class="footer__inner">

			<div class="footer__content">

				{* <a class="footer__logo" href="{$SITE_URL}">
					<img src="{$ASSETS_URL}/images/icons/logo/logo.png" alt="{$config.website_name}">
				</a> *}

{logo link=true classLink="header__logo"}

				<nav class="footer__nav">
					<ul>
						{foreach item=footerMenu from=$footerMenus name=footerMenus key=$key}
							<li><a {if isset($section.sectionId) && $section.sectionId eq $footerMenu.sectionId}class="active"{/if} href="{if !empty($footerMenu.externalLink)}{$footerMenu.externalLink}{else}{$SITE_URL}#{$footerMenu.fileName}{/if}">{$footerMenu.name}</a></li>
						{/foreach}
					</ul>
				</nav>

				<div class="social accent-3">
					{include file="modules/socials.tpl" path="/images/icons/social/"}
				</div>

			</div>

			<div class="footer__copy">
				<div class="footer__copy-item">
					<div class="text-tmp mar-all-0">
						<p>&copy;2024 «<a href="{$SITE_URL}" title="{$config.website_name}">{$config.website_name}</a>»</p>
					</div>
				</div>

				<div class="footer__copy-item">
					<div class="text-tmp mar-all-0">
						<p><a href="{$SITE_URL}/policy/">Политика конфиденциальности</a></p>
					</div>
				</div>

				<div class="footer__copy-item">
					<a href="https://www.life-style.uz/" title="Создание и поддержка сайтов в Ташкенте" target="_blank">Создание сайтов: <i>LIFESTYLE CREATIVE</i></a>
				</div>
			</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>

{* recaptcha - ОБЯЗАТЕЛЬНО *}
{include file="init/script-recaptcha.tpl"}
{* /recaptcha - ОБЯЗАТЕЛЬНО *}

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

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

		if (mapNode) {
			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();

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

			let arrText = [['<h2>{logo link=false classLink="header__logo" style="width:120px"}</h2><p><b>Contacts</b><br>{assign var=phones value=", "|explode:$config.phone}{foreach from=$phones item=phone}<a href="{$phone|strip_phone}">{$phone|format_phone}</a><br>{/foreach}</p><p><b>Address</b><br>{$config.address}</p>']]

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

				myMap.geoObjects.add(myGeoObject)
				myMap.geoObjects.add(new ymaps.Placemark(
						[element[0], element[1]],
						{ balloonContentHeader: text[0], balloonContentBody: text[1],},
						{ preset: '{$ASSETS_URL}/images/icon/map/icon.png', iconCaptionMaxWidth: '30', iconColor: '#e2000f',}
					)
				)
			}
		}
	}
</script>

{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>