<?php
use TourOperatorPro\Factory as FactoryAlias;
use TourOperatorPro\Html\TourOperatorProHtmlFrontend as TourOperatorProHtmlFrontendAlias;
use TourOperatorProBlock\block_top_tour\block_top_tour_helper;
use TourOperatorProFrontend\app\helpers\ConfigHelper as ConfigHelperAlias;
$doc= FactoryAlias::getDocument();
require_once __DIR__.DS."block_top_tour_helper.php";
$list_tour=block_top_tour_helper::getList_tour();
TourOperatorProHtmlFrontendAlias::load_jquery_library('owlcarousel2');
$page_tour_detail= ConfigHelperAlias::get_page_tour_detail();
if($page_tour_detail) {
    $this->page_tour_detail = get_page_link($page_tour_detail);
}else{
    $this->page_tour_detail="";
}

$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;
}
?>