/**
 * @package		TplJuikit
 * @copyright	Copyright (C) CloudHotelier. All rights reserved.
 * @license		GNU GPLv2 <http://www.gnu.org/licenses/gpl.html>
 * @author		Xavier Pallicer <*****@*****.**>
 */
defined('_JEXEC') or die;
// required uikit components
CHAssets::uikit_component('slidenav');
CHAssets::uikit_component('slideset');
CHAssets::uikit_component('slideshow');
CHAssets::script(false, 'https://maps.google.com/maps/api/js');
// aditional js options
$map_marker = (object) ['url' => JUri::root() . "images/flat/map-marker.png", 'width' => 30, 'height' => 45];
$js = (object) ['map_marker' => $map_marker];
CHAssets::script_declaration('window.chtheme_options = ' . json_encode($js) . ';');
?>

<!DOCTYPE html>
<html lang="<?php 
echo $this->language;
?>
" dir="ltr">

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
		<?php 
echo '<jdoc:include type="head"/>';
?>
		<link rel="shortcut icon" href="<?php 
 /**
  * Load required assets
  */
 static function chassets()
 {
     // check if already loaded
     $app = self::getApp();
     if (isset($app->chclient->assets)) {
         return;
     }
     // config
     $config = self::getConfig();
     // chclient assets
     CHAssets::script('chclient', 'chclient.min.js');
     CHAssets::style('chclient', 'chclient.min.css');
     // credit card validator
     CHAssets::script('chclient/jquery-creditcardvalidator', 'jquery.creditCardValidator.min.js');
     // required uikit components
     CHAssets::uikit_component('accordion');
     CHAssets::uikit_component('datepicker');
     CHAssets::uikit_component('form-select');
     CHAssets::uikit_component('notify');
     CHAssets::uikit_component('sticky');
     CHAssets::uikit_component('tooltip');
     // optional components
     if ($config->settings_uikit_form_advanced) {
         CHAssets::uikit_component('form-advanced');
     }
     // javascript options
     $localeconv = CHLibDisplay::getLocaleconv();
     $js = (object) [];
     $js->string_error = self::string('error_occurred');
     $js->string_check_form = self::string('error_check_form');
     $js->string_people = self::string('people');
     $js->money_decimal = $localeconv['mon_decimal_point'];
     $js->money_thousands = $localeconv['mon_thousands_sep'];
     $js->datepicker_i18n = self::datePickerLocale();
     $js->datepicker_min_date = CHLibDate::getDate()->format(CHLibDate::dateLocale());
     $js->datepicker_format = str_replace('Y', 'YYYY', str_replace('m', 'MM', str_replace('d', 'DD', CHLibDate::dateLocale())));
     $js->datepicker_weekstart = CHLibDate::weekStart();
     $js->bootstrap_adapter = (int) $config->settings_bootstrap_adapter;
     CHAssets::script_declaration('window.chclient_options = ' . json_encode($js) . ';');
     $app->chclient->assets = true;
 }