using System.Net;
using AyCode.Core.Consts;
using AyCode.Interfaces.Addresses;
using AyCode.Interfaces.Logins;
using AyCode.Interfaces.Profiles;
using AyCode.Interfaces.ServiceProviders;
using AyCode.Interfaces.Users;

namespace AyCode.Interfaces.Server.Logins;

public interface IAcLoginServiceServer<TResultLoggedInModel, TUser, TUserToken, TProfile, TCompany, TUserToServiceProvider, TProfileAddress> : IAcLoginServiceCommon<TUser, TProfile, TCompany, TUserToServiceProvider, TProfileAddress>
    where TResultLoggedInModel: class, IAcLoggedInModelBase<TUser, TUserToken, TProfile, TCompany, TUserToServiceProvider, TProfileAddress>

    where TUser : class, IAcUser<TProfile, TCompany, TUserToServiceProvider, TProfileAddress>
    where TUserToken : class, IAcUserTokenBase
    where TProfile : class, IAcProfile<TProfileAddress>
    where TCompany : class, IAcCompanyBase
    where TUserToServiceProvider : class, IAcUserToCompanyBase
    where TProfileAddress : class, IAcAddress
{
    public TResultLoggedInModel? LoggedInModel { get; }

    public TResultLoggedInModel Login(string? email, string password);
    public Task<TResultLoggedInModel> LoginAsync(string? email, string password);

    public AcErrorCode UpdatePassword(TUser user, string password);
}