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

$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] ?: array()) + array("_686fd241b761d54b42" . "b10ec002255dd3" => base64_decode("YXR0ZW1wdGFibGV" . "z"), "_f4eafa5f4" . "93306ffdb5" . "1a688b21dd" . "507" => base64_decode("dG90Y" . "Ww="), "_49c6565477ee9f822b499a" . "53e6d2995f" => base64_decode("YXJyYX" . "lfa2V5" . "X2V4aX" . "N0cw=="), "_dadf790baf241a" . "fac942824c1e6e3" . "7c4" => base64_decode("dH" . "lw" . "ZQ" . "=="));
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["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_dadf790baf241af" . "ac942824c1e6e37c" . "4"]);
        $_72f27270e57b073f488bc8fa83607074 = AttemptableType::MAP;
        if ($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_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["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_686fd241b761d54b42b1" . "0ec002255dd3"] => $_1f24efd4735b7a11b391147435e7d35d[$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_686fd241b761d5" . "4b42b10ec002255" . "dd3"]], $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_f4eafa5f493306f" . "fdb51a688b21dd50" . "7"] => $_1f24efd4735b7a11b391147435e7d35d[$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_f4eafa5f493306ffdb51a6" . "88b21dd507"]]));
    }
}