<?php

use KupShop\AdminBundle\Util\AdminClassLocator;
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;

require_once 'help/index.php';

global $type, $cfg;

$main_class = null;
$hdrType = 'panel';
$type = getVal('type');

$className = ucfirst($type).'Menu';
$adminClassLocator = ServiceContainer::getService(AdminClassLocator::class);
$classPath = $adminClassLocator->getClassPath('menu/'.$className.'.php');

if (file_exists($classPath)) {
    $menu = $adminClassLocator->createClass($classPath, $className);
    $menu->run();
} else {
    $menu = new Menu();
    $menu->run();
}
