using System;
using System.Windows.Forms;

namespace OpsDeskPro;

internal static class Program
{
    [STAThread]
    private static void Main(string[] args)
    {
        var smoke = Array.Exists(args, arg => string.Equals(arg, "--smoke-test", StringComparison.OrdinalIgnoreCase))
            || string.Equals(Environment.GetEnvironmentVariable("OPSDESK_CLI_DEMO"), "1", StringComparison.OrdinalIgnoreCase);

        if (smoke)
        {
            Console.WriteLine(CliDemo.BuildJson());
            return;
        }

        Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new MainForm());
    }
}
