using AyCode.Core.Consts;
using AyCode.Interfaces.Addresses;
using AyCode.Interfaces.Profiles;
using AyCode.Interfaces.ServiceProviders;
using AyCode.Interfaces.Users;

namespace AyCode.Interfaces.Server.Logins;

public interface IAcLoggedInModelBase<TUser, TUserToken, TProfile, TCompany, TUserToServiceProvider, TProfileAddress> : IAcLoginDtoBase

    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
{
    bool IsLoggedIn { get; }
    TUser LoggedInUser { get; }
    string AccessToken { get; }
    AcErrorCode LoginErrorCode { get; set; }

    void AddLoggedInUser(TUser user, string accessToken);
    void Logout();
}