<?php

namespace KupShop\LabelsBundle\AdminRegister;

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

class LabelRegister extends AdminRegister implements IAdminRegisterStatic
{
    public static function getMenu(): array
    {
        if (!findModule(\Modules::LABELS)) {
            return [];
        }

        return [
            static::createMenuItem('productsMenu', [
                'name' => 'LabelsList',
                'title' => 'Štítky',
                'left' => 's=menu.php&type=Label',
                'right' => 's=list.php&type=Label',
            ]),
        ];
    }

    public static function getPermissions(): array
    {
        return [
            static::createPermissions('LabelsList', [\Modules::LABELS], ['LABELS']),
        ];
    }
}
