<?php
use TourOperatorPro\Factory as FactoryAlias;
use TourOperatorPro\Html\TourOperatorProHtmlFrontend as TourOperatorProHtmlFrontendAlias;
use TourOperatorProBlock\block_top_activity\block_top_activity_helper;
use TourOperatorProFrontend\app\helpers\ConfigHelper as ConfigHelperAlias;
$doc= FactoryAlias::getDocument();
require_once __DIR__.DS."block_top_activity_helper.php";
$list_activity=block_top_activity_helper::getList_activity();
TourOperatorProHtmlFrontendAlias::load_jquery_library('owlcarousel2');
$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;
}
?>