<?php
use WpBookingProBlock\block_search_service\block_search_service_helper;
use WpBookingProFrontend\app\helpers\ConfigHelper as ConfigHelperAlias;
require_once __DIR__.DS."block_search_service_helper.php";
$doc= FactoryAlias::getDocument();
$list_country=block_search_service_helper::getList_location();
$list_categories=block_search_service_helper::getList_categories();
$list_employees=block_search_service_helper::getList_employees();
$page_list_service= ConfigHelperAlias::get_page_list_service();
if($page_list_service)
    $page_list_service = get_page_link($page_list_service);

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