using Avalonia;
using Avalonia.LinuxFramebuffer;
using Serilog;

namespace VisionBuilder.UI.Avalonia.Uno;

public class Program
{
    [STAThread]
    public static void Main(string[] args)
    {
        Log.Logger = new LoggerConfiguration()
            .MinimumLevel.Debug()
            .WriteTo.Console()
            .CreateLogger();

        if (args.Contains("--drm"))
            BuildAvaloniaApp().StartLinuxDrm(args, card: null, scaling: 1.0);
        else
            BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
    }

    public static AppBuilder BuildAvaloniaApp()
        => AppBuilder.Configure<App>()
            .UsePlatformDetect()
            .LogToTrace();
}
