using AutoMapper;
using PARR.API.Contracts.V1.Responses;
using PARR.DAL.Contracts;
using PARR.DAL.Models;

namespace PARR.API.MappingProfiles.Resolvers
{
    //todo: удалить
    public class TemplateCategoryResolver : IValueResolver<Template, TemplateResponse, string>
    {
        private readonly SettingsFromDb settingsFromDb;

        public TemplateCategoryResolver(SettingsFromDb settingsFromDb)
        {
            this.settingsFromDb = settingsFromDb;
        }

        public string Resolve(Template source, TemplateResponse destination, string destMember, ResolutionContext context)
        {
            return settingsFromDb.Category;
        }
    }
}
