namespace AmiReel.Models;

public enum EncoderMode
{
    Auto,
    NvidiaNvenc,
    CpuX264
}

/// <summary>
/// One render job's parameters. Uses named init properties rather than a positional
/// constructor: TrimStart/FadeSeconds/EndCardHoldSeconds are three consecutive
/// <see langword="double"/> members (and Width/Height/FramesPerSecond/ThumbnailWidth/
/// ThumbnailHeight five consecutive <see langword="int"/> members), so a positional
/// record would let arguments be silently transposed at a call site without the
/// compiler catching it.
/// </summary>
public sealed record RenderSettings
{
    public required IReadOnlyList<string> InputFiles { get; init; }
    public required string EndCardPath { get; init; }
    public required string OutputDirectory { get; init; }
    public required string OutputName { get; init; }
    public required string FfmpegPath { get; init; }
    public required string FfprobePath { get; init; }
    public required EncoderMode Encoder { get; init; }
    public required double TrimStart { get; init; }
    public required double FadeSeconds { get; init; }
    public required double EndCardHoldSeconds { get; init; }
    public required int ThumbnailInterval { get; init; }
    public bool MoveSourcesToOriginals { get; init; } = true;
    public int Width { get; init; } = 3840;
    public int Height { get; init; } = 2160;
    public int FramesPerSecond { get; init; } = 50;
    public int ThumbnailWidth { get; init; } = 1280;
    public int ThumbnailHeight { get; init; } = 720;
}

public sealed record RenderProgress(double Percent, string Stage, string Message);
