<?php
namespace Claromentis\Projects;

$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"] ?: array()) + array("_fa104b8749a1" . "8eca44802f595" . "9c9a6f8" => base64_decode("Tm8gc3RhdHVzIHd" . "pdGggSUQg"), "proj" . "ect_" . "id" => base64_decode("cHJv" . "amVj" . "dF9p" . "ZA=="));
use Claromentis\Core\Application;
use Claromentis\Core\Http\SymfonyRequest;
use Claromentis\Projects\Entity\TaskStatus;
use Claromentis\Projects\Repository\ProjectRepository;
use Claromentis\Projects\Repository\TaskStatusRepository;
class TaskStatusParameter
{
    public static function getConverter(Application $_6eb6fcb92c942851e079f8ec5fb80324)
    {
        return function (int $_d0f9ef06303d1f6bf2691bd0c491726d) use($_6eb6fcb92c942851e079f8ec5fb80324) : TaskStatus {
            
            
            static $repo;
            if (!isset($repo)) {
                $repo = $_6eb6fcb92c942851e079f8ec5fb80324[TaskStatusRepository::class];
            }
            if ($_d0f9ef06303d1f6bf2691bd0c491726d === 0) {
                return $repo->newInstance();
            }
            $status = $repo->find($_d0f9ef06303d1f6bf2691bd0c491726d);
            if (!$status) {
                throw new \RestExNotFound($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_fa104b8749a18eca44802f5959c9a" . "6f8"] . $_d0f9ef06303d1f6bf2691bd0c491726d);
            }
            return $status;
        };
    }
    public static function getConverterRest(Application $_6eb6fcb92c942851e079f8ec5fb80324)
    {
        return function (int $_1542c3f1a74adebf846e7ec65d06d40d, SymfonyRequest $request) use($_6eb6fcb92c942851e079f8ec5fb80324) : TaskStatus {
            
            
            $repo = $_6eb6fcb92c942851e079f8ec5fb80324[TaskStatusRepository::class];
            
            
            
            
            $status = $repo->find($_1542c3f1a74adebf846e7ec65d06d40d);
            $_47d202493f86e587c8454fae73657c90 = $request->get($GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["project_i" . "d"]);
            if (!$status || $status->project_id != $_47d202493f86e587c8454fae73657c90) {
                throw new \RestExNotFound($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_fa104b8749a18eca44802f5959" . "c9a6f8"] . $_1542c3f1a74adebf846e7ec65d06d40d);
            }
            return $status;
        };
    }
}