<?php
use TourOperatorPro\Factory as FactoryAlias;
use TourOperatorPro\Html\TourOperatorProHtmlFrontend as TourOperatorProHtmlFrontendAlias;
use TourOperatorProBlock\block_search_tour\block_search_tour_helper;
use TourOperatorProFrontend\app\helpers\ConfigHelper as ConfigHelperAlias;
require_once __DIR__.DS."block_search_tour_helper.php";
$doc= FactoryAlias::getDocument();
TourOperatorProHtmlFrontendAlias::load_jquery_library('fontawesome');
TourOperatorProHtmlFrontendAlias::load_jquery_library('select2');
TourOperatorProHtmlFrontendAlias::load_jquery_library('moment');
TourOperatorProHtmlFrontendAlias::load_jquery_library('daterangepicker');
TourOperatorProHtmlFrontendAlias::load_jquery_library('ui');
TourOperatorProHtmlFrontendAlias::load_jquery_library('icheck');
$list_country=block_search_tour_helper::getList_destination();
$list_tourtype=block_search_tour_helper::getList_tourtype();
$page_list_tour_search_result= ConfigHelperAlias::get_page_list_tour_search_result();
if($page_list_tour_search_result)
    $page_list_tour_search_result = get_page_link($page_list_tour_search_result);

$layout = $this->item->params->get('layout', 'default');
$plugin_name=TOUROPERATORPRO_PLUGIN_NAME;
$template_path=get_template_directory();
$block_name= basename(__DIR__);
$layout_name="tmpl/$layout.php";
$template1_path="$template_path/$plugin_name/frontend/blocks/$block_name/$layout_name";
$template2_path= __DIR__ . "/tmpl/$layout.php";
if(file_exists($template1_path)){
    require $template1_path;
}else{
    require $template2_path;
}
?>