using System;
using System.Text;
using System.Text.Json;
using RedundancyFinder;
using RedundancyFinderCLI;
using Spectre.Console;
using Spectre.Console.Cli;

internal class Program
{
    private static void Main(string[] args)
    {
        Console.OutputEncoding = Encoding.UTF8;
        var app = new CommandApp<FinderCommand>();
        app.Configure(config =>
        {
            config.AddCommand<AnalyzeCommand>("analyze");
            config.AddCommand<DeleteCommand>("delete");
            config.AddCommand<SanitizeCommand>("sanitize");
#if DEBUG

            config.PropagateExceptions();
            config.ValidateExamples();
#endif
        });

        app.Run(args.ToList());
    }
}