<?php

namespace KupShop\WarehouseBundle\Admin\Tabs;

use KupShop\AdminBundle\Admin\WindowTab;
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
use KupShop\KupShopBundle\Util\System\UrlFinder;

class WarehouseAdminsWindowTab extends WindowTab
{
    protected $title = 'flapWarehouse';

    protected $template = 'window/warehouseAdminsWindowTab.tpl';

    public static function getTypes()
    {
        return [
            'admins' => 1,
        ];
    }

    public function getVars($smarty_tpl_vars)
    {
        $urlFinder = ServiceContainer::getService(UrlFinder::class);
        $data['settings'] = '@@KS@@'.json_encode([
            'url' => $urlFinder->shopUrlAbsolute('/_warehouse/store-app/'),
        ]);

        return $data;
    }
}
