<?php
namespace Claromentis\Infocapture\Subscriber;

$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: array()) + array("_99a1727d246935cd15c5e6f3cd" . "b49524" => base64_decode("RHJhZnQgaXNzd" . "WUgc2F2ZWQuIF" . "Byb2plY3QgJw=" . "="), "_3d037293496" . "6db10d3445da" . "a0c00a7b9" => base64_decode("ZGlzY2FyZF9kcmF" . "mdA=="), "_105276d" . "34856101" . "01145ca3" . "2233c1a7" . "3" => base64_decode("aW5mb" . "2NhcH" . "R1cmU" . "="), "_d3af2f4583f1519f427c4b594941e" . "786" => base64_decode("K" . "S" . "c" . "="), "pro" . "jec" . "t_i" . "d" => base64_decode("cHJva" . "mVjdF" . "9pZA=" . "="), "_eca83ba36" . "e5a56856f6" . "4e0fc3a976" . "eab" => base64_decode("b25EcmFmdEN" . "yZWF0ZWQ="), "_a906349266c8fb7bf22f1eb7" . "0250a8d3" => base64_decode("c2F2ZWRfZHJ" . "hZnQ="), "_42c330079" . "72c054c89c" . "609a2cebb0" . "64e" => base64_decode("RHJhZnQgaXNzdWUgZGlzY2FyZGVkLiBQcm9" . "qZWN0ICc="), "_7dfc646ea8" . "c9714b80e65" . "f92a5388ed0" => base64_decode("I" . "C" . "g" . "="), "_64f374f30afdf42e7360fc3d37db1" . "006" => base64_decode("b25EcmFmdERlbGV0" . "ZWQ="));
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["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_eca83ba36e" . "5a56856f64e" . "0fc3a976eab"], InfocaptureEvents::IC_ISSUE_DRAFT_DELETED => $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_64f374f30afdf42e7" . "360fc3d37db1006"]];
    }
    public function onDraftCreated(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["project" . "_id"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_105276d3485610101145ca32233c1a" . "73"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_a906349266c8f" . "b7bf22f1eb7025" . "0a8d3"], 0, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_99a1727d246935cd15c5e6f3cdb495" . "24"] . $project->GetName() . $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_7dfc646ea8c9714b80e65f92a" . "5388ed0"] . $project->GetId() . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_d3af2f4583f1519f427c4b594941e78" . "6"]);
    }
    public function onDraftDeleted(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["project_" . "id"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_105276d348561" . "0101145ca32233" . "c1a73"], $GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_3d0372934966" . "db10d3445daa0" . "c00a7b9"], 0, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_42c330079" . "72c054c89c" . "609a2cebb0" . "64e"] . $project->GetName() . $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_7dfc646ea8c9714" . "b80e65f92a5388ed" . "0"] . $project->GetId() . $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_d3af2f45" . "83f1519f4" . "27c4b5949" . "41e786"]);
    }
}