<?php
namespace Claromentis\Core\Plugin;

$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"] ?: array()) + array();
use Claromentis\Core\Event\EventSources;
use Symfony\Component\EventDispatcher\Event;
use Throwable;









class PluginStatusEvent extends Event
{
    
    
    
    
    protected string $code;
    
    
    
    
    
    
    
    protected int $intendedStatus;
    
    
    
    
    
    
    protected int $previousStatus;
    
    
    
    
    
    
    protected int $status;
    
    
    
    
    
    
    protected string $source;
    
    
    
    
    
    
    protected ?Throwable $throwable;
    public function __construct(string $code, int $_6c40c95e1e1917386016d93d6261f85d, int $_c87518f15b2c098ea498f3404e7d3ff9, int $status, string $_d0845bff5cd0ddb5ed1d7bd9db996f51 = '', Throwable $_3a16c5fe1a78b54b69e204ec07dcf670 = null)
    {
        Statuses::assertEnabledOrDisabled($_6c40c95e1e1917386016d93d6261f85d);
        Statuses::validateStatuses($_c87518f15b2c098ea498f3404e7d3ff9, $status);
        $this->code = $code;
        $this->intendedStatus = $_6c40c95e1e1917386016d93d6261f85d;
        $this->previousStatus = $_c87518f15b2c098ea498f3404e7d3ff9;
        $this->status = $status;
        $this->source = $_d0845bff5cd0ddb5ed1d7bd9db996f51;
        $this->throwable = $_3a16c5fe1a78b54b69e204ec07dcf670;
    }
    
    
    
    
    
    
    public function getCode() : string
    {
        return $this->code;
    }
    
    
    
    
    
    
    
    
    public function success() : bool
    {
        $_6c40c95e1e1917386016d93d6261f85d = $this->getIntendedStatus();
        $_824e5d657c1ef417f7d34e018cafa484 = $this->getStatus();
        return $_6c40c95e1e1917386016d93d6261f85d === Statuses::ENABLED && $_824e5d657c1ef417f7d34e018cafa484 === Statuses::ENABLED || $_6c40c95e1e1917386016d93d6261f85d === Statuses::DISABLED && $_824e5d657c1ef417f7d34e018cafa484 === Statuses::DISABLED;
    }
    
    
    
    
    
    
    
    
    public function statusDidChange() : bool
    {
        $_c87518f15b2c098ea498f3404e7d3ff9 = $this->getPreviousStatus();
        $_824e5d657c1ef417f7d34e018cafa484 = $this->getStatus();
        return $_c87518f15b2c098ea498f3404e7d3ff9 !== $_824e5d657c1ef417f7d34e018cafa484;
    }
    
    
    
    
    
    
    
    public function getIntendedStatus() : int
    {
        return $this->intendedStatus;
    }
    
    
    
    
    
    
    public function getIntendedStatusName() : string
    {
        return Statuses::getStatusName($this->intendedStatus);
    }
    
    
    
    
    
    
    
    public function getPreviousStatus() : int
    {
        return $this->previousStatus;
    }
    
    
    
    
    
    
    public function getPreviousStatusName() : string
    {
        return Statuses::getStatusName($this->previousStatus);
    }
    
    
    
    
    
    
    
    public function getStatus() : int
    {
        return $this->status;
    }
    
    
    
    
    
    
    public function getStatusName() : string
    {
        return Statuses::getStatusName($this->status);
    }
    
    
    
    
    
    
    
    
    
    public function getSource() : string
    {
        return $this->source;
    }
    
    
    
    
    
    
    
    
    public function getThrowable() : ?Throwable
    {
        return $this->throwable;
    }
}