using Microsoft.AspNetCore.Identity;
using WebVentaCoche.Models;
using WebVentaCoche.ViewModels;

namespace WebVentaCoche.Helpers
{
    public interface IUserHelper
    {
        Task<User> GetUserAsync(string email);
        Task<IdentityResult> AddUserAsync(User user, string password);
        Task ValidateRoleAsync(string role);
        Task AddUserRoleAsync(User user, string role);
        Task<bool> IsUserInroleAsync(User user, string role);
        Task<SignInResult> LoginAsync(LoginViewModel model);
        Task LogoutAsync();
        Task<string> GenerateEmailConfirmationTokenAsync(User user);
        Task<IdentityResult> ConfirmEmailAsync(User user, string token);
        Task<bool> IsEmailConfirmedAsync(User user);
        Task<User?> GetUserByIdAsync(string id);
    }
}
