namespace Insight.Agent.Constants
{
    public static class Deploy
    {
        public static class Updater
        {
            public const string Name = "Updater";
            public const string ServiceName = "insight_updater";
            public const string Description = "Insight Updater";
        }

        public static DirectoryInfo GetAppDirectory(string appName)
            => new($"{Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)}/Webmatic/Insight/{appName}");

        public static FileInfo GetAppExecutable(string appName)
            => new($"{GetAppDirectory(appName).FullName}/{appName.ToLower()}.exe");

        public static Uri GetUpdateHref(Uri api, string appName)
            => new($"{api.AbsoluteUri}/update/{appName.ToLower()}/windows");
    }
}