using System;
using System.Threading.Tasks;
using BLL.Services;
using DAL.Repositories;
using DB;
using Microsoft.Extensions.Logging;

class Program
{
    static async Task Main(string[] args)
    {
        // Create dependencies
        var loggerFactory = LoggerFactory.Create(builder =>
        {
            builder.AddConsole();
        });
        var logger = loggerFactory.CreateLogger<ShippingHandoverFormService>();
        
        var dbProvider = new DbProvider();
        var repository = new ShippingHandoverFormRepository(dbProvider);
        var service = new ShippingHandoverFormService(repository, logger);
        
        // Test the number generation
        Console.WriteLine("Testing shipping handover number generation...");
        
        // Test with GOFO channel
        var number1 = await service.GenerateShippingHandoverNumberAsync("GOFO");
        Console.WriteLine($"Generated number for GOFO: {number1}");
        
        // Test with USPS channel
        var number2 = await service.GenerateShippingHandoverNumberAsync("USPS");
        Console.WriteLine($"Generated number for USPS: {number2}");
        
        // Test with UPS channel
        var number3 = await service.GenerateShippingHandoverNumberAsync("UPS");
        Console.WriteLine($"Generated number for UPS: {number3}");
        
        Console.WriteLine("Test completed!");
    }
}