<?php

namespace KupShop\WarehouseBundle\Admin\Tabs;

use KupShop\AdminBundle\Admin\WindowTab;

class PosWarehouseSettingsTab extends WindowTab
{
    protected $title = 'flapPosWarehouseSettings';

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

    public function handleUpdate()
    {
        if (empty(getVal('data')['data']['virtual_box'] ?? null)) {
            $this->returnError('Není vybrán virtuální box');
        }
    }

    public function getLabel()
    {
        return translate($this->title, 'posSettings');
    }

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