namespace ClaudeDo.Installer.Core;

public sealed class InstallContext
{
    // WelcomePage / install destination
    public string InstallDirectory { get; set; } = @"C:\Program Files\ClaudeDo";

    // Mode + versions (set by App startup after InstallModeDetector runs)
    public InstallerMode Mode { get; set; } = InstallerMode.FreshInstall;
    public string? InstallerVersion { get; set; }   // from this installer's assembly
    public string? InstalledVersion { get; set; }   // from install.json (or set by DownloadAndExtractStep)
    public string? LatestVersion { get; set; }      // from Gitea API (may be null if offline)
    public bool LatestTagUnparseable { get; set; }   // true if latest tag isn't a System.Version

    // PathsPage
    public string DbPath { get; set; } = "~/.claudeDo/todo.db";
    public string LogRoot { get; set; } = "~/.claudeDo/logs";
    public string SandboxRoot { get; set; } = "~/.claudeDo/sandbox";
    public string WorktreeRootStrategy { get; set; } = "sibling";
    public string CentralWorktreeRoot { get; set; } = "~/.claudeDo/worktrees";

    // ServicePage
    public int SignalRPort { get; set; } = 47_821;
    public int QueueBackstopIntervalMs { get; set; } = 30_000;
    public string ClaudeBin { get; set; } = "claude";
    public bool AutoStart { get; set; } = true;
    public int RestartDelayMs { get; set; } = 5000;

    // UiSettingsPage
    public string SignalRUrl { get; set; } = "http://127.0.0.1:47821/hub";
    public string UiDbPath { get; set; } = "~/.claudeDo/todo.db";

    // InstallPage
    public bool CreateDesktopShortcut { get; set; } = true;

    // WelcomePage — register the external MCP endpoint with the Claude CLI.
    public bool RegisterMcpWithClaude { get; set; } = true;
    public int ExternalMcpPort { get; set; } = 47_822;

    // Language selection (persisted to ui.config.json)
    public string Language { get; set; } = "";
}
