<?php

namespace IZON\Admin\Web\Controllers;

use IZON\Admin\Services\AdminService;

use IZON\MVC\Controller;
use IZON\MVC\HttpRequest;
use IZON\MVC\ModelAndView;

/**
 * controller, ktery spravuje notifikace
 */
class NotificationsController implements Controller {
    
    /**
     * @var AdminService
     */
    protected $adminService;
    
    /**
     * jake view se ma pouzit pro zobrazeni formulare
     * @var string 
     */
    protected $dashboardViewName = "admin/dashboard";

    
    public function __construct(AdminService $adminService) {
        $this->adminService = $adminService;
    }
//    
//    public function execute(HttpRequest $request) {
//        $modelAndView = new ModelAndView($this->dashboardViewName);
//        return $modelAndView;
//    }
    
    public function ajaxGetNotificationsJson(HttpRequest $request) {
        $modelAndView = new ModelAndView("admin/simple/json-respose");
        $modelAndView->putParameter("json", ["_note" => "notifikace jeste nejsou, Zatim jen udrzuje otevrenou session, aby se ajaxovy voleni nechovali divne, pokud se sessino zlikviduje"]);
        return $modelAndView;
    }
}
