namespace SharepointToolbox.Core.Models;

public class TransferJob
{
    public string SourceSiteUrl { get; set; } = string.Empty;
    public string SourceLibrary { get; set; } = string.Empty;
    public string SourceFolderPath { get; set; } = string.Empty; // relative within library
    public string DestinationSiteUrl { get; set; } = string.Empty;
    public string DestinationLibrary { get; set; } = string.Empty;
    public string DestinationFolderPath { get; set; } = string.Empty;
    public TransferMode Mode { get; set; } = TransferMode.Copy;
    public ConflictPolicy ConflictPolicy { get; set; } = ConflictPolicy.Skip;

    /// <summary>
    /// Optional library-relative file paths. When non-empty, only these files
    /// are transferred; SourceFolderPath recursive enumeration is skipped.
    /// </summary>
    public IReadOnlyList<string> SelectedFilePaths { get; set; } = Array.Empty<string>();

    /// <summary>
    /// When true, recreate the source folder name under the destination folder
    /// (dest/srcFolderName/... ). When false, the source folder's contents land
    /// directly inside the destination folder.
    /// </summary>
    public bool IncludeSourceFolder { get; set; }

    /// <summary>
    /// When true (default), transfer the files inside the source folder.
    /// When false, only create the folder structure (useful together with
    /// <see cref="IncludeSourceFolder"/> to clone an empty scaffold).
    /// </summary>
    public bool CopyFolderContents { get; set; } = true;
}
