<?php
/* Smarty version 4.5.2, created on 2024-08-14 12:25:49
  from '/home/life/public_html/teg.lifestyle.uz/admin/templates/views/maps/maps.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.2',
  'unifunc' => 'content_66bca24df02ca2_96043909',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '45d135cb0159b38bdfeb1f3a5e28c9e31fe19bca' => 
    array (
      0 => '/home/life/public_html/teg.lifestyle.uz/admin/templates/views/maps/maps.tpl',
      1 => 1679630384,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:components/page-header.tpl' => 1,
  ),
),false)) {
function content_66bca24df02ca2_96043909 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/home/life/public_html/teg.lifestyle.uz/includes/composer/vendor/smarty/smarty/libs/plugins/function.html_options.php','function'=>'smarty_function_html_options',),1=>array('file'=>'/home/life/public_html/teg.lifestyle.uz/includes/smarty_plugins/function.google_maps.php','function'=>'smarty_function_google_maps',),2=>array('file'=>'/home/life/public_html/teg.lifestyle.uz/includes/smarty_plugins/function.yandex_maps.php','function'=>'smarty_function_yandex_maps',),));
?>
<form action="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['adminUrl']->value, ENT_QUOTES, 'UTF-8', true);?>
/maps" method="post" id="map" autocomplete="off">
    <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "buttons", null, null);?>
		<button class="btn btn-sm btn-primary" type="submit" name="action" value="save"><i class="ph-floppy-disk me-2"></i>Сохранить</button>
    <?php $_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

    <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "breadcrumb", null, null);?>
		<a href="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['adminUrl']->value, ENT_QUOTES, 'UTF-8', true);?>
/maps" class="breadcrumb-item"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['title']->value, ENT_QUOTES, 'UTF-8', true);?>
</a>
    <?php $_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

    <?php $_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "showBy", null, null);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>

    <?php $_smarty_tpl->_subTemplateRender("file:components/page-header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('buttons'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'buttons'),'breadcrumb'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'breadcrumb'),'showBy'=>$_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'showBy')), 0, false);
?>
    
    
    <!-- Content area -->
    <div class="content">
        <div class="row"> 
            <div class="col-md-6">
    		    <div class="card border shadow-sm">
			        <div class="card-header d-flex flex-wrap">
				        <h6 class="mb-0">Описание</h6>
				        <div class="d-inline-flex ms-auto">
					        <a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
				        </div>
			        </div>
			        <div class="collapse show">
	                    <div class="card-body">
	                        <div class="row">
					            <div class="col-md-6">
						            <div class="form-group mb-3">
							            <label class="form-label is-visible"><?php if ((isset($_smarty_tpl->tpl_vars['map']->value['isMaps'])) && $_smarty_tpl->tpl_vars['map']->value['isMaps'] == 1) {?>Отключить карту<?php } else { ?>Включить карту<?php }?></label>
	                                    <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['works']->value,'name'=>"map[isMaps]",'id'=>"isMaps",'selected'=>(($tmp = $_smarty_tpl->tpl_vars['map']->value['isMaps'] ?? null)===null||$tmp==='' ? 0 ?? null : $tmp),'class'=>"form-control select"),$_smarty_tpl);?>

						            </div>
					            </div>
					            <div class="col-md-6">
						            <div class="form-group mb-3">
							            <label class="form-label is-visible">Тип карты</label>
							            <select class="form-control select" name="map[type]">
								            <option value="">Выбрать тип карты</option>
								            <option value="yandex" <?php if ((isset($_smarty_tpl->tpl_vars['map']->value['type'])) && $_smarty_tpl->tpl_vars['map']->value['type'] == 'yandex') {?>selected<?php }?>>Yandex карта</option>
								            <option value="google" <?php if ((isset($_smarty_tpl->tpl_vars['map']->value['type'])) && $_smarty_tpl->tpl_vars['map']->value['type'] == 'google') {?>selected<?php }?>>Google карта</option>
							            </select>
						            </div>
					            </div>
					            <div class="col-md-6">
						            <div class="form-group mb-3">
							            <label class="form-label is-visible <?php if ((isset($_smarty_tpl->tpl_vars['errors']->value['languageName']))) {?>text-danger<?php }?>">API ключ карты</label>
							            <input type="text" class="form-control" name="map[api_key]" value="<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['api_key']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['map']->value['api_key'], ENT_QUOTES, 'UTF-8', true);
}?>">
						            </div>
					            </div>
	                            <div class="col-md-6">
	                                 <div class="form-group mb-3">
	                                    <label class="form-label is-visible">Координаты (lat, lng)</label>
	                                    <input type="text" class="form-control" name="map[coordinates]" value="<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['coordinates']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['map']->value['coordinates'], ENT_QUOTES, 'UTF-8', true);
}?>">
	                                </div>
	                            </div>

	                            <div class="col-md-4">
	                                <div class="form-group mb-3">
	                                    <label class="form-label is-visible">Масштаб карты</label>
	                                    <input type="text" class="form-control" name="map[zoom]" value="<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['zoom']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['map']->value['zoom'], ENT_QUOTES, 'UTF-8', true);
}?>">
	                                </div>
	                            </div>
	                            <div class="col-md-4">
	                                <div class="form-group mb-3">
	                                    <label class="form-label">Высота карты</label>
	                                    <input type="text" class="form-control" name="map[maps_height]" value="<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['maps_height']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['map']->value['maps_height'], ENT_QUOTES, 'UTF-8', true);
}?>">
	                                </div>
	                            </div>
	                            <div class="col-md-4">
	                                <div class="form-group mb-3">
	                                    <label class="form-label is-visible">Ширина карты</label>
	                                    <input type="text" class="form-control" name="map[maps_wight]" value="<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['maps_wight']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['map']->value['maps_wight'], ENT_QUOTES, 'UTF-8', true);
}?>">
	                                </div>
	                            </div>
	                            <div class="col-md-4">
	                                <div class="form-group mb-3">
	                                    <label class="form-label is-visible">Размер маркера</label>
	                                    <input type="text" class="form-control" name="map[scale]" value="<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['scale']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['map']->value['scale'], ENT_QUOTES, 'UTF-8', true);
}?>">
	                                </div>
	                            </div>
	                           <div class="col-md-4">
	                                <div class="form-group mb-3">
	                                    <label class="form-label is-visible">Цвет маркера</label>
	                                    <input type="text" class="form-control" name="map[fillColor]" value="<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['fillColor']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['map']->value['fillColor'], ENT_QUOTES, 'UTF-8', true);
}?>">
	                                </div>
	                            </div>
	                            <div class="col-md-4">
	                                <div class="form-group mb-3">
	                                    <label class="form-label is-visible">Прозрачность маркера </label>
	                                    <input type="text" class="form-control" name="map[fillOpacity]" value="<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['fillOpacity']))) {
echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['map']->value['fillOpacity'], ENT_QUOTES, 'UTF-8', true);
}?>">
	                                </div>
	                            </div>
	                        </div>
	                    </div>
			        </div>
    		    </div>
            </div>

            <div class="col-md-6">
        		<div class="card border shadow-sm">
			        <div class="card-header d-flex flex-wrap">
				        <h6 class="mb-0">Карта</h6>
				        <div class="d-inline-flex ms-auto">
					        <a class="text-body" data-card-action="collapse"><i class="ph-caret-down"></i></a>
				        </div>
			        </div>
			        <div class="collapse show">
				        <?php if ((isset($_smarty_tpl->tpl_vars['map']->value['isMaps'])) && $_smarty_tpl->tpl_vars['map']->value['isMaps'] == 1) {?>
					        <div class="block_maps"><div id="map-canvas"></div></div>
				        <?php }?>
			        </div>
    			</div>
            </div>

	        <div class="col-md-12 main main_buttons text-center">
		        <?php echo $_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'buttons');?>

	        </div>
        </div>
    </div>

</form>

<?php echo '<script'; ?>
>
    $(document).ready(function() {
        <?php if ((isset($_smarty_tpl->tpl_vars['messages']->value['saved']))) {?>
            new Noty({ text: 'Настройки сохранены.', type: 'success', timeout: 1500 }).show();
	    <?php }?>
    }); 
<?php echo '</script'; ?>
>

    
<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['isMaps'])) && $_smarty_tpl->tpl_vars['map']->value['isMaps'] == 1) {?>
	<?php if ((isset($_smarty_tpl->tpl_vars['map']->value['type'])) && $_smarty_tpl->tpl_vars['map']->value['type'] == 'google') {?>
		<?php echo smarty_function_google_maps(array(),$_smarty_tpl);?>

	<?php } elseif ((isset($_smarty_tpl->tpl_vars['map']->value['type'])) && $_smarty_tpl->tpl_vars['map']->value['type'] == 'yandex') {?>
	    <?php echo smarty_function_yandex_maps(array(),$_smarty_tpl);?>

	<?php }
}
}
}
