using Hotline.NewRock.Mappers;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
using NewRock.Sdk;

namespace Hotline.NewRock
{
    public static class NewRockStartupExtensions
    {
        public static IServiceCollection AddNewRock(this IServiceCollection services, string deviceAddress)
        {
            services
                .AddNewRockSdk(deviceAddress)
                ;

            TypeAdapterConfig.GlobalSettings.Scan(typeof(EventConfigs).Assembly);

            return services;
        }
    }
}
