<?php
namespace Claromentis\Infocapture\Subscriber;

$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] ?: array()) + array("_105276d34856" . "10101145ca322" . "33c1a73" => base64_decode("aW5mb2NhcHR1cmU" . "="), "_64f374f30afdf42e736" . "0fc3d37db1006" => base64_decode("b25EcmFmdE" . "RlbGV0ZWQ="), "_99a1727d246935cd15c5e6f3" . "cdb49524" => base64_decode("RHJhZnQgaXNzdWUgc2F2ZWQuIFBy" . "b2plY3QgJw=="), "_3d0372934966db10d3" . "445daa0c00a7b9" => base64_decode("ZGlzY2FyZF9kc" . "mFmdA=="), "_42c33007972c054c89c6" . "09a2cebb064e" => base64_decode("RHJhZnQgaXNzd" . "WUgZGlzY2FyZG" . "VkLiBQcm9qZWN" . "0ICc="), "_d3af2f4583f1" . "519f427c4b594" . "941e786" => base64_decode("KSc" . "="), "_a90634926" . "6c8fb7bf22" . "f1eb70250a" . "8d3" => base64_decode("c2F2ZWRfZHJhZ" . "nQ="), "_eca83ba36e5a56856f64e0" . "fc3a976eab" => base64_decode("b25EcmFmdENyZWF0" . "ZWQ="), "_7dfc646ea8c9714" . "b80e65f92a5388ed" . "0" => base64_decode("ICg" . "="), "project_i" . "d" => base64_decode("cHJvamVjdF9p" . "ZA=="));
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["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_eca83ba36e5a56856f64" . "e0fc3a976eab"], InfocaptureEvents::IC_ISSUE_DRAFT_DELETED => $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_64f374f3" . "0afdf42e7" . "360fc3d37" . "db1006"]];
    }
    public function onDraftCreated(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["pro" . "jec" . "t_i" . "d"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_105276d3485610101145ca3" . "2233c1a73"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_a906349266c8fb7bf2" . "2f1eb70250a8d3"], 0, $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_99a1727d246935cd15c5e6f3cdb4" . "9524"] . $project->GetName() . $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_7dfc646ea8c9714b80e65f" . "92a5388ed0"] . $project->GetId() . $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_d3af2f4583" . "f1519f427c4" . "b594941e786"]);
    }
    public function onDraftDeleted(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["project_" . "id"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_105276d348" . "5610101145c" . "a32233c1a73"], $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_3d0372934966d" . "b10d3445daa0c0" . "0a7b9"], 0, $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_42c330079" . "72c054c89c" . "609a2cebb0" . "64e"] . $project->GetName() . $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_7dfc646ea8c9714b80e" . "65f92a5388ed0"] . $project->GetId() . $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_d3af2f4583f1519f427c4b59494" . "1e786"]);
    }
}