<footer class="footer">
	<div class="flex:col-max">

		<div class="footer__inner">
			{* logo *}
			{logo link=true classLink="footer__logo logo"}
			{* /logo *}

			<div class="footer__nav">
				<div class="footer__list">
					<div class="text-tmp title-22 color-white"><h4>Меню</h4></div>
					<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.url}{/if}">{$footerMenu.alias}</a></li>
						{/foreach}
					</ul>
				</div>

				<div class="footer__list">
					<div class="text-tmp title-22 color-white"><h4>Информация</h4></div>
					<ul>
						{fetch_sections assign=otherPages sections=[31,32,33] status="V" getContent=true}
						{foreach from=$otherPages item=otherPage}
						<li><a href="{if !empty($otherPage.externalLink)}{$otherPage.externalLink}{else}{$SITE_URL}{$otherPage.url}{/if}">{$otherPage.name}</a></li>
						{/foreach}
					</ul>
				</div>

				<div class="footer__list">
					<div class="text-tmp title-22 color-white"><h4>Контакты</h4></div>
					<div class="footer__list-phone">
						<ul>
							{assign var=phones value=", "|explode:$config.phone}
							{foreach from=$phones item=phone name=phones}
								<li><a href="tel:{$phone|strip_phone}">{$phone|format_phone}</a></li>
							{/foreach}
							<li>Консультации и расчёт</li>
						</ul>
					</div>

					<div class="footer__list-mail">
						<ul>
							<li>Электронная почта:</li>
							<li><a href="mailto:{$config.email}">{$config.email}</a></li>
						</ul>
					</div>

					<div class="footer__list-adress">
						<ul>
							<li>Адрес:</li>
							<li>{$config.address}</li>
						</ul>
					</div>
				</div>

				<div class="footer__list">
					<div class="text-tmp title-22 color-white"><h4>Соц. сети</h4></div>
					<div class="social">{include file="modules/socials.tpl" path="/images/icons/social/"}</div>
					<div class="footer__list-adress">
						<ul>
							<li>“{$config.website_name}”</li>
							<li>© yazb.uz {if $smarty.now|date_format:"%Y" ne 2023}2023 - {/if}{$smarty.now|date_format:"%Y"}</li>
							<li>ИНН {$config.inn}</li>
						</ul>
					</div>
				</div>
			</div>

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

<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script>
	AOS.init();
</script>

<script src="{$ASSETS_URL}/js/vendor/gsap.min.js"></script>
<script src="{$ASSETS_URL}/js/vendor/ScrollSmoother.min.js"></script>
<script src="{$ASSETS_URL}/js/vendor/ScrollTrigger.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>Контакты</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>Адрес</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>

