<?php
namespace Claromentis\Infocapture\Filter;

$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"] ?: array()) + array("proj" . "ect_" . "id" => base64_decode("cHJvamVjdF9pZA" . "=="), "_7608a269022" . "9dd26ac43cb6" . "0aa2a7d97" => base64_decode("bGFzdF9t" . "b2RpZmll" . "ZA=="), "_7276e0af756e529d30af7aaafe" . "4e7784" => base64_decode("YXJjaGl" . "2ZWQ="), "_8f3ef8878b2a82b830d051a05" . "9162317" => base64_decode("Y3JlY" . "XRlZF" . "9mcm9" . "t"), "_f73dab606630b388645c" . "4f7d3fbb13bb" => base64_decode("YXJy" . "YXlf" . "bWVy" . "Z2U="), "_8af1b1bd0c05175c85a4cee44d47d" . "2da" => base64_decode("cXVlcnlfZm" . "llbGRz"), "_1ac5cc48c34" . "c5362e94d866" . "7cc7b0ddc" => base64_decode("LA" . "=="), "_5159b3572969eca46acd1" . "b2e1418459c" => base64_decode("aW1" . "wbG" . "9kZ" . "Q=="), "_5ecedeb8c" . "083d4a2a4e" . "bef5526097" . "f58" => base64_decode("YXNz" . "aWdu" . "ZWVz"), "sta" . "tus" => base64_decode("c3RhdH" . "Vz"), "_c42d618c08b720c2" . "5b90ad5550e2db2f" => base64_decode("cmV" . "wb3" . "J0Z" . "XI="), "_4d707fab93bebb00bbe69e8159697c" . "90" => base64_decode(""), "_57c0a2f09e2a920c0560b" . "affc5e3d295" => base64_decode("cmVwb3J0ZX" . "Jz"), "_ff248fe1eba6" . "8f190ea1ff00a" . "554acde" => base64_decode("YXNzaWdu" . "ZWU="), "_83396dddfc39e26775d1e61db5" . "abf86b" => base64_decode("bW9uaXRvcmluZw=" . "="), "_7f5aa4e96d4b415a86ed" . "72ebff677cbe" => base64_decode("cXVlcnk" . "="));
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["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_c42d618c08b7" . "20c25b90ad555" . "0e2db2f"]] ?? $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_4d707fab93be" . "bb00bbe69e815" . "9697c90"]);
        $this->setAssignees($parameters[$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_ff248fe" . "1eba68f1" . "90ea1ff0" . "0a554acd" . "e"]] ?? $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_4d707fab93b" . "ebb00bbe69e8" . "159697c90"]);
        $this->setStatus($parameters[$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["statu" . "s"]] ?? null);
        $this->setCreatedDate($this->formatDate($parameters[$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_8f3ef8878b2a82b8" . "30d051a059162317"]] ?? null));
        $this->setModifiedDate($this->formatDate($parameters[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_7608a2690229dd" . "26ac43cb60aa2a7" . "d97"]] ?? null));
        if (isset($parameters[$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_7276e0af756e529d" . "30af7aaafe4e7784"]])) {
            $this->setArchived(StringUtil::parseBoolean($parameters[$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_7276e0af75" . "6e529d30af7" . "aaafe4e7784"]]));
        }
        if (isset($parameters[$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_83396dddfc39e26775d1" . "e61db5abf86b"]])) {
            $this->setMonitoring(StringUtil::parseBoolean($parameters[$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_83396dddfc39e26775d1e61db5abf" . "86b"]]));
        }
        $this->setQuery($parameters[$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_7f5aa4e96d" . "4b415a86ed7" . "2ebff677cbe"]] ?? null);
        if (isset($parameters[$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_8af1b1bd0c05175c85a4cee44d47d" . "2da"]])) {
            $this->setQueryFields($parameters[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_8af1b1bd0c05175c85a4cee44d4" . "7d2da"]]);
        }
    }
    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["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_f73dab606630b388645c4f" . "7d3fbb13bb"](parent::toArray(), [$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["project" . "_id"] => $this->projectId, $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_57c0a2f" . "09e2a920" . "c0560baf" . "fc5e3d29" . "5"] => !empty($this->reporter) ? $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_5159b3572969eca46ac" . "d1b2e1418459c"]($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_1ac5cc48c34c5362e94d8667cc" . "7b0ddc"], $this->reporter) : null, $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_5ecedeb8c083d4a2a" . "4ebef5526097f58"] => !empty($this->assignee) ? $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_5159b3572969eca46a" . "cd1b2e1418459c"]($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_1ac5cc48c34" . "c5362e94d866" . "7cc7b0ddc"], $this->assignee) : null, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_7276e0af756e529d30af7aaafe4e778" . "4"] => $this->archived, $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_83396dddfc" . "39e26775d1e" . "61db5abf86b"] => $this->monitoring, $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["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;
        }
    }
}