<?php
namespace Claromentis\Quiz\Controller\Survey;

$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: array()) + array("_808678d0ea" . "74ab6ed2edc" . "976aba17a5a" => base64_decode("cXVpei5hZG1pbi5wZXJtc" . "19zYXZlZA=="), "_383eb6a52ac" . "879d52bae89b" . "6e0d6e944" => base64_decode("cXVpei5wb2xsLmNvbW1vbi5tb2" . "R1bGVfbmFtZQ=="), "_38d8693b4b1a2d382e9a28ede628ab" . "61" => base64_decode("cXVpei5zdXJ2ZXkuYW" . "RtaW5fcGVybWlzc2lv" . "bnMub25fc2F2ZQ=="), "_4ae8a5044871" . "69e99ca469036" . "dc038f1" => base64_decode("cXVpei9hZG1pbi9zdXJ2ZXkvYWRtaW4vaW5kZXgu" . "aHRtbA=="));
use Claromentis\Core\Application;
use Claromentis\Core\Http\RequestData;
use Claromentis\Core\Http\TemplaterCallResponse;
use Claromentis\Core\Event\GenericEvent;
use Claromentis\Core\Localization\Lmsg;
use Claromentis\Quiz\Permissions\SurveyAdminPermissions;
use Exception;
use Psr\Http\Message\ServerRequestInterface as Request;




class AdminPanelController
{
    private $survey_admin_permission;
    protected $lmsg;
    public function __construct(SurveyAdminPermissions $survey_admin_permissions, Lmsg $lmsg)
    {
        $this->survey_admin_permission = $survey_admin_permissions;
        $this->lmsg = $lmsg;
    }
    
    
    
    
    
    
    
    public function Show(Application $_6eb6fcb92c942851e079f8ec5fb80324)
    {
        $_5a390a043a1f804672a7bbe5f10cd3c4 = [];
        $_199355a18b7f1825de748a3bdea73bdb = $this->survey_admin_permission->GetDialog();
        $_199355a18b7f1825de748a3bdea73bdb->SetShowButtons(true, false);
        $_199355a18b7f1825de748a3bdea73bdb->Show($_5a390a043a1f804672a7bbe5f10cd3c4);
        return new TemplaterCallResponse($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_4ae8a504487" . "169e99ca4690" . "36dc038f1"], $_5a390a043a1f804672a7bbe5f10cd3c4, ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_383eb6a52ac8" . "79d52bae89b6e" . "0d6e944"]));
    }
    
    
    
    
    
    
    
    
    
    
    
    public function Save(Application $_6eb6fcb92c942851e079f8ec5fb80324, RequestData $request_data, Request $_b791059c94b285cdf1c90ca6f3a8f2a6)
    {
        $_ba3845cb79c005cf3269af8c83ddbe5e = null;
        $_5a390a043a1f804672a7bbe5f10cd3c4 = [];
        try {
            $request_data->CheckToken();
            $_199355a18b7f1825de748a3bdea73bdb = $this->survey_admin_permission->GetDialog();
            $_199355a18b7f1825de748a3bdea73bdb->SetShowButtons(true, false);
            $_199355a18b7f1825de748a3bdea73bdb->Update($_b791059c94b285cdf1c90ca6f3a8f2a6);
            $_6eb6fcb92c942851e079f8ec5fb80324->acl->Save($_199355a18b7f1825de748a3bdea73bdb->permissions);
            $_199355a18b7f1825de748a3bdea73bdb->Show($_5a390a043a1f804672a7bbe5f10cd3c4);
            $_6eb6fcb92c942851e079f8ec5fb80324->dispatcher->dispatch($GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_38d8693b4b1a2d382e9a28ede6" . "28ab61"], new GenericEvent());
        } catch (Exception $_fe441aa3ef350bfb1a1a1ad8520dd530) {
            $_ba3845cb79c005cf3269af8c83ddbe5e = $_fe441aa3ef350bfb1a1a1ad8520dd530->getMessage();
        }
        $_fd5a3a643834299cbdadfc3540ba0bcb = new TemplaterCallResponse($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_4ae8a504487169e" . "99ca469036dc038f" . "1"], $_5a390a043a1f804672a7bbe5f10cd3c4, ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_383eb6a52ac879d52bae89b6e0d" . "6e944"]));
        $_fd5a3a643834299cbdadfc3540ba0bcb->SetMessage(($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_808678d0ea74ab6ed2ed" . "c976aba17a5a"]));
        if ($_ba3845cb79c005cf3269af8c83ddbe5e) {
            $_fd5a3a643834299cbdadfc3540ba0bcb->SetMessage($_ba3845cb79c005cf3269af8c83ddbe5e, true);
        }
        return $_fd5a3a643834299cbdadfc3540ba0bcb;
    }
}