<?php
namespace Claromentis\Quiz\Controller\Rest\V2;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] ?: array()) + array("_686fd241b" . "761d54b42b" . "10ec002255" . "dd3" => base64_decode("YXR0ZW1wdGFi" . "bGVz"), "_49c6565477ee" . "9f822b499a53e" . "6d2995f" => base64_decode("YXJyYXlfa2V5X2V" . "4aXN0cw=="), "_dadf790baf241afac942824" . "c1e6e37c4" => base64_decode("dH" . "lw" . "ZQ" . "=="), "_f4eafa5f493306ffdb51a688b21d" . "d507" => base64_decode("dG90YW" . "w="));
use Claromentis\Core\Application;
use Claromentis\Core\Http\JsonPrettyResponse;
use Claromentis\Core\Http\RequestData;
use Claromentis\Quiz\AttemptableType;
use Claromentis\Quiz\Facade\AttemptableFacade;
class AttemptableController
{
    
    
    
    
    protected $attemptable_facade;
    
    
    
    
    
    
    public function __construct(AttemptableFacade $attemptable_facade)
    {
        $this->attemptable_facade = $attemptable_facade;
    }
    
    
    
    
    
    
    
    
    public function GetAttemptables(Application $_6eb6fcb92c942851e079f8ec5fb80324, RequestData $data)
    {
        $_dadf790baf241afac942824c1e6e37c4 = $data->Get($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_dadf790baf241afac942824c1" . "e6e37c4"]);
        $_72f27270e57b073f488bc8fa83607074 = AttemptableType::MAP;
        if ($GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_49c6565477ee9f822b49" . "9a53e6d2995f"]($_dadf790baf241afac942824c1e6e37c4, $_72f27270e57b073f488bc8fa83607074)) {
            $_dadf790baf241afac942824c1e6e37c4 = $_72f27270e57b073f488bc8fa83607074[$_dadf790baf241afac942824c1e6e37c4];
        } else {
            $_dadf790baf241afac942824c1e6e37c4 = AttemptableType::TYPE_ALL;
        }
        $context = $_6eb6fcb92c942851e079f8ec5fb80324->security;
        $user_id = $context->GetUserId();
        $_1f24efd4735b7a11b391147435e7d35d = $this->attemptable_facade->GetAttemptables($user_id, [], null, $_dadf790baf241afac942824c1e6e37c4, 10, 0, true);
        return new JsonPrettyResponse(array($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_686fd241b761d5" . "4b42b10ec002255" . "dd3"] => $_1f24efd4735b7a11b391147435e7d35d[$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_686fd241b7" . "61d54b42b10" . "ec002255dd3"]], $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_f4eafa5f" . "493306ffd" . "b51a688b2" . "1dd507"] => $_1f24efd4735b7a11b391147435e7d35d[$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_f4eafa5f49" . "3306ffdb51a" . "688b21dd507"]]));
    }
}