namespace DragonISO.Engine.Domain;

public sealed record EngineConfig(
    FrameProcessingSettings Global,
    IReadOnlyList<IsoAssignment> Assignments,
    NdiGroupSettings? NdiGroups = null)
{
    public static readonly EngineConfig Default =
        new(FrameProcessingSettings.Default, Array.Empty<IsoAssignment>(), NdiGroupSettings.Default);

    /// <summary>Returns <see cref="NdiGroups"/> or <see cref="NdiGroupSettings.Default"/> when null (legacy configs).</summary>
    public NdiGroupSettings GroupsOrDefault => NdiGroups ?? NdiGroupSettings.Default;
}
