namespace Predictalytics.Hosting;

/// <summary>
/// Compile-time settings for the Deployment Center (https://dc.mhdf.de), which replaced
/// the separate Watchdog and LicenseLabrador servers.
///
/// The base URL is deliberately NOT user configuration: it decides where the license check
/// goes and where update packages are downloaded from. A configurable endpoint would let
/// anyone point the app at a fake license or update server.
/// </summary>
public static class DcConfig
{
    public const string BaseUrl = "https://dc.mhdf.de";

    /// <summary>Slug in dc_projects — license, UpdateService, error stream and bugtracker share it.</summary>
    public const string ProductSlug = "predictalytics";

    /// <summary>
    /// Reported to the license activation list, the monitor and the error stream.
    /// Generated by Deploymentcenter.BuildInfo.targets from &lt;Version&gt; in the csproj —
    /// bump it there when releasing, it is what the UpdateService compares against.
    /// </summary>
    public static string AppVersion => BuildInfo.Version;

    /// <summary>Commit this build came from — travels with error reports.</summary>
    public static string GitCommitShort => BuildInfo.GitCommitShort;

    /// <summary>Dashboard grouping of the Watchdog monitor.</summary>
    public const string MonitorGroup = "Applications";

    /// <summary>Value for the "environment" field of the error stream.</summary>
#if DEBUG
    public const string Environment = "development";
#else
    public const string Environment = "production";
#endif
}
