<?php

namespace KupShop\AdminBundle\Admin;

use KupShop\AdminBundle\Util\ReportActivitiesNotificationsUtil;

class reportActivitiesNotifications extends \Window
{
    protected $tableName = 'report_activities_notifications';

    public function get_vars()
    {
        $vars = parent::get_vars();
        $vars['body']['data']['periods'] = [
            ['key' => ReportActivitiesNotificationsUtil::PERIOD_FREQUENT, 'title' => 'Každých 20 minut'],
            ['key' => ReportActivitiesNotificationsUtil::PERIOD_NORMAL, 'title' => 'Každé 2 hodiny'],
            ['key' => ReportActivitiesNotificationsUtil::PERIOD_EXPENSIVE, 'title' => 'Jednou denně v noci'],
        ];
        $vars['body']['data']['types'] = \KupShop\AdminBundle\Util\ActivityLog::TYPES;
        $this->unserializeCustomData($vars['body']['data']);

        return $vars;
    }

    public function getData()
    {
        $data = parent::getData();

        $this->serializeCustomData($data);

        return $data;
    }
}

return reportActivitiesNotifications::class;
