<?php
namespace Claromentis\Infocapture\Subscriber;

$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] ?: array()) + array("project_i" . "d" => base64_decode("cHJvamVjdF9pZ" . "A=="), "_42c33007972c054c8" . "9c609a2cebb064e" => base64_decode("RHJhZnQgaXNzdWUgZGlzY2FyZGVkLiBQcm9" . "qZWN0ICc="), "_3d037293" . "4966db10d" . "3445daa0c" . "00a7b9" => base64_decode("ZGlzY2FyZF9kcmF" . "mdA=="), "_105276d3485" . "610101145ca3" . "2233c1a73" => base64_decode("aW5mb2NhcHR1cm" . "U="), "_7dfc646e" . "a8c9714b8" . "0e65f92a5" . "388ed0" => base64_decode("IC" . "g="), "_64f374f30afdf42e7360fc3d37db10" . "06" => base64_decode("b25EcmFmdER" . "lbGV0ZWQ="), "_a90634926" . "6c8fb7bf22" . "f1eb70250a" . "8d3" => base64_decode("c2F2ZWRfZHJhZnQ" . "="), "_eca83ba36e5a56856f64e0fc3a976" . "eab" => base64_decode("b25EcmFmdENyZWF0" . "ZWQ="), "_d3af2f4583f1519f427c4b594941e7" . "86" => base64_decode("KS" . "c="), "_99a1727d246935cd" . "15c5e6f3cdb49524" => base64_decode("RHJhZnQgaXNzdWUgc2F2ZWQu" . "IFByb2plY3QgJw=="));
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["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_eca83ba36e5a56" . "856f64e0fc3a976" . "eab"], InfocaptureEvents::IC_ISSUE_DRAFT_DELETED => $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_64f374f30afdf42e7360fc3d3" . "7db1006"]];
    }
    public function onDraftCreated(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["proj" . "ect_" . "id"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_105276d3485610101145ca32233" . "c1a73"], $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_a906349266c8fb7bf22f1" . "eb70250a8d3"], 0, $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_99a1727d246935cd15c5e6f3cdb49" . "524"] . $project->GetName() . $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_7dfc646ea8" . "c9714b80e65" . "f92a5388ed0"] . $project->GetId() . $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_d3af2f4583f1519f427c" . "4b594941e786"]);
    }
    public function onDraftDeleted(DraftIssueEvent $event)
    {
        $issue = $event->getIssue();
        $projectId = $issue->GetProperty($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["proj" . "ect_" . "id"]);
        $project = new \HDProject();
        $project->Load($projectId);
        $this->audit->Store(Audit::AUDIT_SUCCESS, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_105276d3485610101145" . "ca32233c1a73"], $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_3d0372934966db10d344" . "5daa0c00a7b9"], 0, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_42c33007972c054c89c609a2c" . "ebb064e"] . $project->GetName() . $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_7dfc646ea8c9714b80e65f92a5" . "388ed0"] . $project->GetId() . $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_d3af2f4583f1519f427c4b5949" . "41e786"]);
    }
}