<?php
namespace Claromentis\Infocapture\Subscriber;

$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"] ?: array()) + array("_d3af2f458" . "3f1519f427" . "c4b594941e" . "786" => base64_decode("K" . "S" . "c" . "="), "_42c33007972c054c" . "89c609a2cebb064e" => base64_decode("RHJhZnQgaXNzdWUgZGlzY2FyZGVkLiBQcm9qZWN0IC" . "c="), "_7dfc646ea8c97" . "14b80e65f92a53" . "88ed0" => base64_decode("I" . "C" . "g" . "="), "proje" . "ct_id" => base64_decode("cHJvamVjd" . "F9pZA=="), "_105276d3485610101145c" . "a32233c1a73" => base64_decode("aW5mb2NhcHR1cmU" . "="), "_a906349266c8fb7bf22f1eb70250a" . "8d3" => base64_decode("c2F2ZWRfZHJhZ" . "nQ="), "_64f374f30afdf42e7360" . "fc3d37db1006" => base64_decode("b25EcmFmdERlbGV0" . "ZWQ="), "_99a1727d246935cd15c5e6f3cdb" . "49524" => base64_decode("RHJhZnQgaXNzdW" . "Ugc2F2ZWQuIFBy" . "b2plY3QgJw=="), "_3d0372934966db1" . "0d3445daa0c00a7b" . "9" => base64_decode("ZGlzY2FyZF9kcmFmdA=" . "="), "_eca83ba36e5a56856f64e0fc3" . "a976eab" => base64_decode("b25EcmFmdEN" . "yZWF0ZWQ="));
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["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_eca83ba" . "36e5a568" . "56f64e0f" . "c3a976ea" . "b"], InfocaptureEvents::IC_ISSUE_DRAFT_DELETED => $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_64f374f30afdf42e7360fc3d" . "37db1006"]];
    }
    public function onDraftCreated(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["project_i" . "d"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_105276d3485610101145ca32233" . "c1a73"], $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_a906349266c8f" . "b7bf22f1eb7025" . "0a8d3"], 0, $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_99a1727d24693" . "5cd15c5e6f3cdb" . "49524"] . $project->GetName() . $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_7dfc646ea8c971" . "4b80e65f92a5388" . "ed0"] . $project->GetId() . $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_d3af2f4583f1519f427c4b594941e" . "786"]);
    }
    public function onDraftDeleted(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["pro" . "jec" . "t_i" . "d"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_105276d3485610" . "101145ca32233c1" . "a73"], $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_3d0372934966db10d344" . "5daa0c00a7b9"], 0, $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_42c33007972c054c89c609a2" . "cebb064e"] . $project->GetName() . $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_7dfc646ea8c9714" . "b80e65f92a5388ed" . "0"] . $project->GetId() . $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_d3af2f4583f1519f427c4b594" . "941e786"]);
    }
}