<?php

declare(strict_types=1);

namespace MauticPlugin\DealFlowBundle\Event;

use MauticPlugin\DealFlowBundle\Entity\Deal;
use MauticPlugin\DealFlowBundle\Entity\DealStage;

final class DealStageChangedEvent extends DealEvent
{
    public function __construct(
        Deal $deal,
        private ?DealStage $previousStage,
        private DealStage $currentStage,
        string $origin = 'ui',
        ?string $actorType = 'user',
        ?int $actorId = null,
        array $payload = [],
    ) {
        parent::__construct($deal, $origin, $actorType, $actorId, $payload);
    }

    public function getPreviousStage(): ?DealStage
    {
        return $this->previousStage;
    }

    public function getCurrentStage(): DealStage
    {
        return $this->currentStage;
    }
}
