using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using MTWorkHR.Application.Identity;
using MTWorkHR.Application.Mapper;
using MTWorkHR.Application.Models;
using MTWorkHR.Core.Global;
using MTWorkHR.Core.IRepositories;
using MTWorkHR.Core.UnitOfWork;
using MTWorkHR.Infrastructure.Entities;
using MTWorkHR.Application.Services.Interfaces;
using MTWorkHR.Core.Email;
using MTWorkHR.Core.Entities;
using MTWorkHR.Infrastructure.UnitOfWorks;
using System.Linq.Dynamic.Core;

namespace MTWorkHR.Application.Services
{
    public class SubscriptionService : BaseService<SubscriptionConfiguration, SubscriptionConfigurationDto, SubscriptionConfigurationDto>, ISubscriptionService
    {
        private readonly IUnitOfWork _unitOfWork;
        //private readonly AppSettingsConfiguration _configuration;
        //private readonly GlobalInfo _globalInfo;

        public SubscriptionService(IUnitOfWork unitOfWork) : base(unitOfWork)
        {
            _unitOfWork = unitOfWork;
        }

        public override async Task<SubscriptionConfigurationDto> GetById(long id)
        {
            var entity = await _unitOfWork.SubscriptionConfiguration.GetByIdAsync(id);
            var response = MapperObject.Mapper.Map<SubscriptionConfigurationDto>(entity);
            return response;
        }
      
      

    }
}
