namespace MyOffice.Web.Models.Account;

using AutoMapper;
using MyOffice.Services.Account.Domain;
using MyOffice.Services.Identity;
using User;

public class AccessRightsViewModel
{
	public UserViewModel? User { get; set; } = null!;
	public bool AllowRead { get; set; }
	public bool AllowWrite { get; set; }
	public bool AllowManage { get; set; }
	public bool AllowDelete { get; set; }
	public bool IsOwner { get; set; }
}

public class AccessRightsViewModelProfile : Profile
{
	public AccessRightsViewModelProfile()
	{
		CreateMap<AccountAccessDto, AccessRightsViewModel>()
			.AfterMap<AccessRightsViewModelMappingAction>()
			;

	}
}

public class AccessRightsViewModelMappingAction : IMappingAction<AccountAccessDto, AccessRightsViewModel>
{
	private readonly IContextProvider _contextProvider;

	public AccessRightsViewModelMappingAction(IContextProvider contextProvider)
	{ 
		_contextProvider = contextProvider;
	}

	public void Process(AccountAccessDto source, AccessRightsViewModel destination, ResolutionContext context)
	{
	}
}