using PARR.Domain.Enums;
using PARR.Domain.Settings;

namespace PARR.Core.Services.TaskServices.Providers
{
    internal class TaskMqSettingsProvider : ITaskMqSettingsProvider
    {
        private readonly Func<TaskTypeEnum, IMqSettings> settingsFactory;

        public TaskMqSettingsProvider(
            Func<TaskTypeEnum, IMqSettings> settingsFactory
            )
        {
            this.settingsFactory = settingsFactory;
        }

        public IMqSettings GetSettings(TaskTypeEnum typeCode)
        {
            return settingsFactory(typeCode);
        }
    }
}
