<?php
namespace Claromentis\Infocapture\Subscriber;

$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"] ?: array()) + array("projec" . "t_id" => base64_decode("cHJvam" . "VjdF9p" . "ZA=="), "_d3af2f4583f1519f42" . "7c4b594941e786" => base64_decode("KSc" . "="), "_105276d34" . "8561010114" . "5ca32233c1" . "a73" => base64_decode("aW5mb2" . "NhcHR1" . "cmU="), "_eca83ba36e5a56856f64e0fc3a976e" . "ab" => base64_decode("b25EcmFmdENyZWF" . "0ZWQ="), "_99a1727d246935cd15c5e6f3" . "cdb49524" => base64_decode("RHJhZnQgaXNzdWUgc2" . "F2ZWQuIFByb2plY3Qg" . "Jw=="), "_64f374f30afdf42e7360fc3" . "d37db1006" => base64_decode("b25EcmFmdERlbG" . "V0ZWQ="), "_a906349266" . "c8fb7bf22f1" . "eb70250a8d3" => base64_decode("c2F2ZW" . "RfZHJh" . "ZnQ="), "_7dfc646ea8c97" . "14b80e65f92a53" . "88ed0" => base64_decode("IC" . "g="), "_3d0372934966db10d3445daa0c" . "00a7b9" => base64_decode("ZGlzY2FyZF9kcmFmd" . "A=="), "_42c33007972c054c89c609a2c" . "ebb064e" => base64_decode("RHJhZnQgaXNzdWUgZGlzY2FyZGVkLiBQcm9qZWN0" . "ICc="));
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["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_eca83ba36e5a56856f64e" . "0fc3a976eab"], InfocaptureEvents::IC_ISSUE_DRAFT_DELETED => $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_64f374f30afdf42e7360fc" . "3d37db1006"]];
    }
    public function onDraftCreated(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["projec" . "t_id"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_105276d3485610101145" . "ca32233c1a73"], $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_a90634926" . "6c8fb7bf22" . "f1eb70250a" . "8d3"], 0, $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_99a1727d246935cd15c5e6f3cdb4952" . "4"] . $project->GetName() . $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_7dfc646ea8c9714b80e65f92a53" . "88ed0"] . $project->GetId() . $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_d3af2f4583f1519f4" . "27c4b594941e786"]);
    }
    public function onDraftDeleted(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["project_" . "id"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_105276d3485610101145ca32233c1a" . "73"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_3d0372934966db10d3445daa" . "0c00a7b9"], 0, $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_42c3300" . "7972c054" . "c89c609a" . "2cebb064" . "e"] . $project->GetName() . $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_7dfc646ea8c9714b80e6" . "5f92a5388ed0"] . $project->GetId() . $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_d3af2f4583f15" . "19f427c4b59494" . "1e786"]);
    }
}