namespace TeamsISO.Engine.Domain;

/// <summary>
/// Structured engine alerts for UI banner display and ops logging.
/// </summary>
public abstract record EngineAlert(string Message)
{
    public sealed record NdiRuntimeMismatch(string DetectedVersion, string ExpectedVersion)
        : EngineAlert($"NDI runtime version mismatch: detected {DetectedVersion}, expected {ExpectedVersion}.");

    public sealed record OutputNameCollision(string Name)
        : EngineAlert($"Another TeamsISO instance on the LAN is emitting an output named '{Name}'.");

    public sealed record PipelineError(Guid ParticipantId, string Reason)
        : EngineAlert($"Pipeline {ParticipantId} entered Error: {Reason}");

    public sealed record ConfigSaveFailed(string Reason)
        : EngineAlert($"Failed to save configuration: {Reason}");
}
