<?php

namespace App\Modules\AntiTheft\Application;

use App\Modules\AntiTheft\Domain\RuleEvaluation;

final readonly class SignalProcessingResult
{
    private function __construct(
        public string $status,
        public ?RuleEvaluation $evaluation,
    ) {}

    public static function duplicate(): self
    {
        return new self('duplicate', null);
    }

    public static function processed(RuleEvaluation $evaluation): self
    {
        return new self($evaluation->triggered() ? 'incident_triggered' : 'no_match', $evaluation);
    }
}
