using System.Text.Json.Serialization;
namespace DevDrive;
///
/// Represents the index.json configuration file structure.
///
public class DevDriveConfig
{
///
/// Display name for the drive.
///
[JsonPropertyName("driveName")]
public string DriveName { get; set; } = "Dev Drive";
///
/// Icon path in format "path,index" (e.g. "%SystemRoot%\System32\shell32.dll,8").
///
[JsonPropertyName("driveIcon")]
public string DriveIcon { get; set; } = "";
///
/// Total drive capacity in MB (for display purposes).
///
[JsonPropertyName("driveTotalMB")]
public double DriveTotalMB { get; set; } = 1.44;
///
/// Free space in MB (for display purposes).
///
[JsonPropertyName("driveFreeMB")]
public double DriveFreeMB { get; set; } = 0.72;
///
/// List of symlink entries to create in the drive root.
///
[JsonPropertyName("paths")]
public List Paths { get; set; } = [];
///
/// List of applications to prompt for launch after mounting.
///
[JsonPropertyName("startupApps")]
public List StartupApps { get; set; } = [];
}
///
/// Represents a single symlink entry.
///
public class SymlinkEntry
{
///
/// Name of the symlink (folder/file name in the drive).
///
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
///
/// Target path the symlink points to.
///
[JsonPropertyName("path")]
public string Path { get; set; } = string.Empty;
}
///
/// Represents an application to launch after mounting.
///
public class StartupApp
{
///
/// Display name shown in the dialog.
///
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
///
/// Path to the executable.
///
[JsonPropertyName("path")]
public string Path { get; set; } = string.Empty;
///
/// Command line arguments (optional).
///
[JsonPropertyName("arguments")]
public string Arguments { get; set; } = string.Empty;
///
/// Working directory (optional, defaults to executable's directory).
///
[JsonPropertyName("workingDirectory")]
public string WorkingDirectory { get; set; } = string.Empty;
///
/// Whether this app is checked by default in the dialog.
///
[JsonPropertyName("checkedByDefault")]
public bool CheckedByDefault { get; set; } = true;
}