using ZB.MOM.WW.OtOpcUa.Core.Abstractions;

namespace ZB.MOM.WW.OtOpcUa.Driver.Calculation;

/// <summary>
///     Bound options for a <see cref="CalculationDriver"/> instance. The Calculation pseudo-driver has
///     no backend/endpoint config — its only input is the authored raw calc tags the deploy artifact
///     injects as the <see cref="RawTags"/> list (each carrying the tag's <c>scriptId</c> + resolved
///     <c>scriptSource</c> + trigger config inside its <see cref="RawTagEntry.TagConfig"/> blob).
/// </summary>
public sealed class CalculationDriverOptions
{
    /// <summary>The driver's authored raw calc tags (RawPath + TagConfig blob + WriteIdempotent), from
    /// the deploy artifact. Each is mapped to a <see cref="CalculationTagDefinition"/> at construction.</summary>
    public IReadOnlyList<RawTagEntry> RawTags { get; init; } = Array.Empty<RawTagEntry>();

    /// <summary>Per-script wall-clock evaluation budget handed to the <see cref="CalculationEvaluator"/>.
    /// Defaults to 2 seconds (parity with the VirtualTag evaluator).</summary>
    public TimeSpan RunTimeout { get; init; } = TimeSpan.FromSeconds(2);
}
