<?php
namespace Claromentis\Infocapture\Filter;

$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] ?: array()) + array("_5159b357" . "2969eca46" . "acd1b2e14" . "18459c" => base64_decode("aW1wbG9kZQ" . "=="), "_8f3ef88" . "78b2a82b" . "830d051a" . "05916231" . "7" => base64_decode("Y3JlYXRlZF9mcm" . "9t"), "_5ecedeb8c083d4a" . "2a4ebef5526097f5" . "8" => base64_decode("YXN" . "zaW" . "duZ" . "WVz"), "_8af1b1bd0c" . "05175c85a4c" . "ee44d47d2da" => base64_decode("cXVlcnlfZmll" . "bGRz"), "_f73dab606630b388645c4f7d3fbb13b" . "b" => base64_decode("YXJyYXlfbWVyZ2" . "U="), "_ff248fe1eb" . "a68f190ea1f" . "f00a554acde" => base64_decode("YXNzaW" . "duZWU="), "_1ac5cc48c34c5362e94d" . "8667cc7b0ddc" => base64_decode("LA" . "=="), "_83396dddfc39e26775d1e6" . "1db5abf86b" => base64_decode("bW9uaXRvc" . "mluZw=="), "project_" . "id" => base64_decode("cHJvamVj" . "dF9pZA=="), "_57c0a2f09e2a920c0560baf" . "fc5e3d295" => base64_decode("cmVwb3" . "J0ZXJz"), "_7608a269" . "0229dd26a" . "c43cb60aa" . "2a7d97" => base64_decode("bGFzdF9t" . "b2RpZmll" . "ZA=="), "_c42d618c08b720c25b90ad5550e2d" . "b2f" => base64_decode("cmVwb3" . "J0ZXI="), "_4d707fab93bebb" . "00bbe69e8159697" . "c90" => base64_decode(""), "_7f5aa4e96d" . "4b415a86ed7" . "2ebff677cbe" => base64_decode("cXVlcnk" . "="), "statu" . "s" => base64_decode("c3R" . "hdH" . "Vz"), "_7276e0af756e529d30a" . "f7aaafe4e7784" => base64_decode("YXJjaGl" . "2ZWQ="));
use Claromentis\Core\Util\StringUtil;
use Date;
use Psr\Http\Message\ServerRequestInterface;
use Throwable;
class IssueFilter extends AbstractFilter
{
    
    
    
    
    protected ?int $projectId = null;
    
    
    
    
    protected array $reporter = [];
    
    
    
    
    protected array $assignee = [];
    
    
    
    
    protected ?bool $archived = null;
    
    
    
    
    protected bool $monitoring = false;
    
    
    
    
    protected ?string $query = null;
    
    
    
    
    
    
    protected array $queryFields = [];
    
    
    
    
    
    
    
    public function fill(ServerRequestInterface $request) : void
    {
        $parameters = $request->getQueryParams();
        $this->setPaginationAttributesFromRequest($request);
        $this->setReporters($parameters[$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_c42d618c08b720c25b90ad5550e2db2" . "f"]] ?? $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_4d707fab93" . "bebb00bbe69" . "e8159697c90"]);
        $this->setAssignees($parameters[$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_ff248fe1eba68f190" . "ea1ff00a554acde"]] ?? $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_4d707fab93bebb00bbe69e8159697c" . "90"]);
        $this->setStatus($parameters[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["stat" . "us"]] ?? null);
        $this->setCreatedDate($this->formatDate($parameters[$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_8f3ef8878b2" . "a82b830d051a" . "059162317"]] ?? null));
        $this->setModifiedDate($this->formatDate($parameters[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_7608a2690229dd26ac43cb60aa2a" . "7d97"]] ?? null));
        if (isset($parameters[$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_7276e0af756e529d30af7aaafe4" . "e7784"]])) {
            $this->setArchived(StringUtil::parseBoolean($parameters[$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_7276e0af756e529d30af7aaafe4" . "e7784"]]));
        }
        if (isset($parameters[$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_83396dddfc39e26" . "775d1e61db5abf86" . "b"]])) {
            $this->setMonitoring(StringUtil::parseBoolean($parameters[$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_83396dddfc39e" . "26775d1e61db5a" . "bf86b"]]));
        }
        $this->setQuery($parameters[$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_7f5aa4e96" . "d4b415a86e" . "d72ebff677" . "cbe"]] ?? null);
        if (isset($parameters[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_8af1b1bd0c05175c85a4ce" . "e44d47d2da"]])) {
            $this->setQueryFields($parameters[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_8af1b1bd0c05175c85a4cee44d47d" . "2da"]]);
        }
    }
    public function getProjectId() : ?int
    {
        return $this->projectId;
    }
    public function setProjectId(?int $projectId = null) : void
    {
        $this->projectId = $projectId;
    }
    public function getReporterList() : array
    {
        return $this->reporter;
    }
    public function setReporters(string $_c42d618c08b720c25b90ad5550e2db2f) : void
    {
        StringUtil::validateCommaSeparatedList($_c42d618c08b720c25b90ad5550e2db2f);
        $this->reporter = StringUtil::splitCommaSeparatedList($_c42d618c08b720c25b90ad5550e2db2f);
    }
    public function getAssigneeList() : array
    {
        return $this->assignee;
    }
    public function setAssignees(string $_ff248fe1eba68f190ea1ff00a554acde) : void
    {
        StringUtil::validateCommaSeparatedList($_ff248fe1eba68f190ea1ff00a554acde);
        $this->assignee = StringUtil::splitCommaSeparatedList($_ff248fe1eba68f190ea1ff00a554acde);
    }
    public function getArchived() : ?bool
    {
        return $this->archived;
    }
    public function setArchived(?bool $_7276e0af756e529d30af7aaafe4e7784) : void
    {
        $this->archived = $_7276e0af756e529d30af7aaafe4e7784;
    }
    public function getMonitoring() : bool
    {
        return $this->monitoring;
    }
    public function setMonitoring(bool $_83396dddfc39e26775d1e61db5abf86b) : void
    {
        $this->monitoring = $_83396dddfc39e26775d1e61db5abf86b;
    }
    public function getQuery() : ?string
    {
        return $this->query;
    }
    public function setQuery(?string $_7f5aa4e96d4b415a86ed72ebff677cbe) : void
    {
        $this->query = $_7f5aa4e96d4b415a86ed72ebff677cbe;
    }
    
    
    
    
    public function getQueryFields() : array
    {
        return $this->queryFields;
    }
    public function setQueryFields(string $_fc95e77eab852b63129161149bcdac0d) : void
    {
        StringUtil::validateCommaSeparatedList($_fc95e77eab852b63129161149bcdac0d);
        $this->queryFields = StringUtil::splitCommaSeparatedList($_fc95e77eab852b63129161149bcdac0d);
    }
    public function toArray() : array
    {
        return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_f73dab606630b" . "388645c4f7d3fb" . "b13bb"](parent::toArray(), [$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["proj" . "ect_" . "id"] => $this->projectId, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_57c0a2f09e2a92" . "0c0560baffc5e3d" . "295"] => !empty($this->reporter) ? $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_5159b3572969eca46acd1b2e1418459" . "c"]($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_1ac5cc48c34c5362e94d" . "8667cc7b0ddc"], $this->reporter) : null, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_5ecedeb8c083d4a2a4" . "ebef5526097f58"] => !empty($this->assignee) ? $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_5159b3572969ec" . "a46acd1b2e14184" . "59c"]($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_1ac5cc48c34c5362e94d" . "8667cc7b0ddc"], $this->assignee) : null, $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_7276e0af756e52" . "9d30af7aaafe4e7" . "784"] => $this->archived, $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_83396dddfc39e26775d1e61db5" . "abf86b"] => $this->monitoring, $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["sta" . "tus"] => $this->status]);
    }
    
    
    
    
    
    
    
    
    
    private function formatDate(?string $_67a0d624aebcceb0abd5ce56a53ff06f) : ?Date
    {
        if ($_67a0d624aebcceb0abd5ce56a53ff06f === null) {
            return null;
        }
        try {
            return new \Date($_67a0d624aebcceb0abd5ce56a53ff06f);
        } catch (Throwable $_fe441aa3ef350bfb1a1a1ad8520dd530) {
            return null;
        }
    }
}