<?php

namespace KupShop\ConvertorsBundle\AdminRegister;

use KupShop\AdminBundle\AdminRegister\AdminRegister;
use KupShop\AdminBundle\AdminRegister\IAdminRegisterDynamic;
use KupShop\AdminBundle\AdminRegister\IAdminRegisterStatic;

class ConvertorsAdminRegister extends AdminRegister implements IAdminRegisterDynamic, IAdminRegisterStatic
{
    public function getDynamicMenu(): array
    {
        return [
            static::createMenuItem(
                'productsMenu',
                [
                    'name' => 'Convertors',
                    'right' => '',
                    'left' => '',
                ]
            ),
            static::createMenuItem(
                'productsMenu/Convertors',
                [
                    'name' => 'Convertors',
                    'right' => 's=list.php&type=Convertors',
                    'left' => 's=menu.php&type=Convertors',
                ]
            ),
            static::createMenuItem(
                'productsMenu/Convertors',
                [
                    'name' => 'ConvertingTable',
                    'right' => 's=list.php&type=ConvertingTable',
                    'left' => 's=menu.php&type=ConvertingTable',
                ]
            ),
        ];
    }

    public static function getPermissions(): array
    {
        return [
            self::createPermissions('Convertors', [\Modules::CONVERTORS], ['CONVERTORS']),
        ];
    }
}
