//
//  LoginStateManager.h
//  AIIM
//
//  Created by qitewei on 2025/6/15.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface LoginStateManager : NSObject
// 登录状态
@property (nonatomic, assign, readonly, getter=isLoggedIn) BOOL loggedIn;
// 当前用户ID
@property (nonatomic, copy, readonly, nullable) NSString *currentUserID;
// 当前用户Token
@property (nonatomic, copy, readonly, nullable) NSString *currentUserToken;

// 单例访问方法
+ (instancetype)sharedManager;

@property (nonatomic,copy) void(^checkLoginState)(BOOL isLogin);

/**
 检查登录状态，如果未登录则自动弹出登录界面
 @return 是否已登录
 */
- (BOOL)checkLoginStatus;

- (void)loginWithAccountInfo:(NSDictionary *)info;

- (void)logout;

- (void)getUserInfo;

- (void)clearLoginStatus;

- (void)logoutSet;
@end

NS_ASSUME_NONNULL_END
