<?php
namespace Claromentis\Infocapture\Subscriber;

$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"] ?: array()) + array("_eca83ba36e5a56856f64e0fc3a976ea" . "b" => base64_decode("b25EcmFmdENyZW" . "F0ZWQ="), "_a906349266c8f" . "b7bf22f1eb7025" . "0a8d3" => base64_decode("c2F2ZWRfZHJh" . "ZnQ="), "proj" . "ect_" . "id" => base64_decode("cHJv" . "amVj" . "dF9p" . "ZA=="), "_64f374f30afdf42e7360fc3d37db100" . "6" => base64_decode("b25EcmFmdERlbG" . "V0ZWQ="), "_d3af2f4583f" . "1519f427c4b5" . "94941e786" => base64_decode("K" . "S" . "c" . "="), "_99a1727d246935cd15" . "c5e6f3cdb49524" => base64_decode("RHJhZnQgaXNzdWUgc2F2ZWQuIFByb2plY3QgJw=" . "="), "_105276d3485" . "610101145ca3" . "2233c1a73" => base64_decode("aW5mb2NhcHR1c" . "mU="), "_42c3300" . "7972c054" . "c89c609a" . "2cebb064" . "e" => base64_decode("RHJhZnQgaXNzdWUgZGlzY2FyZGVkLi" . "BQcm9qZWN0ICc="), "_3d0372934966db" . "10d3445daa0c00a" . "7b9" => base64_decode("ZGlzY2FyZF9kcmF" . "mdA=="), "_7dfc646ea8c9714b80" . "e65f92a5388ed0" => base64_decode("I" . "C" . "g" . "="));
use Claromentis\Core\Audit\Audit;
use Claromentis\Core\Event\EventSubscriberInterface;
use Claromentis\Infocapture\Event\DraftIssueEvent;
use Claromentis\Infocapture\InfocaptureEvents;
class IssueSubscriber implements EventSubscriberInterface
{
    protected Audit $audit;
    public function __construct(Audit $audit)
    {
        $this->audit = $audit;
    }
    public static function getSubscribedEvents()
    {
        return [InfocaptureEvents::IC_ISSUE_DRAFT_CREATED => $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_eca83ba36e5a56856f64e0fc" . "3a976eab"], InfocaptureEvents::IC_ISSUE_DRAFT_DELETED => $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_64f374f" . "30afdf42" . "e7360fc3" . "d37db100" . "6"]];
    }
    public function onDraftCreated(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["project_" . "id"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_105276d348" . "5610101145c" . "a32233c1a73"], $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_a906349266c8fb7bf2" . "2f1eb70250a8d3"], 0, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_99a1727d" . "246935cd1" . "5c5e6f3cd" . "b49524"] . $project->GetName() . $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_7dfc646ea8c9714b80e65f92a5388ed" . "0"] . $project->GetId() . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_d3af2f4583" . "f1519f427c4" . "b594941e786"]);
    }
    public function onDraftDeleted(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["proje" . "ct_id"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_105276d3485610101145ca3" . "2233c1a73"], $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_3d0372934966d" . "b10d3445daa0c0" . "0a7b9"], 0, $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_42c33007972c054c89c609a2cebb06" . "4e"] . $project->GetName() . $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_7dfc646ea8c9714b80e6" . "5f92a5388ed0"] . $project->GetId() . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_d3af2f4583f1519f427c4b594" . "941e786"]);
    }
}