<?php

namespace KupShop\SellerBundle\AdminRegister;

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

class SellersAdminRegister extends AdminRegister implements IAdminRegisterDynamic, IAdminRegisterStatic
{
    public function getDynamicMenu(): array
    {
        if (!findModule(\Modules::TRANSLATIONS)) {
            return [];
        }

        return [
            static::createMenuItem(
                'translate',
                [
                    'name' => 'translate.translateSellers',
                    'right' => 's=list.php&type=translateSellers',
                ]
            ),
        ];
    }

    public static function getPermissions(): array
    {
        if (!findModule(\Modules::TRANSLATIONS)) {
            return [];
        }

        return [
            static::createPermissions('translateSellers', [], ['TRANSLATESELLERS']),
        ];
    }
}
