using System.IO;

namespace StellaOps.Feedser.Exporter.Json;

/// <summary>
/// Configuration for JSON exporter output paths and determinism controls.
/// </summary>
public sealed class JsonExportOptions
{
    /// <summary>
    /// Root directory where exports are written. Default "exports/json".
    /// </summary>
    public string OutputRoot { get; set; } = Path.Combine("exports", "json");

    /// <summary>
    /// Format string applied to the export timestamp to produce the directory name.
    /// </summary>
    public string DirectoryNameFormat { get; set; } = "yyyyMMdd'T'HHmmss'Z'";

    /// <summary>
    /// Optional static name for the symlink (or directory junction) pointing at the most recent export.
    /// </summary>
    public string LatestSymlinkName { get; set; } = "latest";

    /// <summary>
    /// When true, attempts to re-point <see cref="LatestSymlinkName"/> after a successful export.
    /// </summary>
    public bool MaintainLatestSymlink { get; set; } = true;

    /// <summary>
    /// Optional repository identifier recorded alongside export state metadata.
    /// </summary>
    public string? TargetRepository { get; set; }
}
