//
//  XHookSettingsManager.h
//  配置管理器 - 头文件
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface XHookSettingsManager : NSObject

@property (nonatomic, assign, readonly) BOOL isLoaded;

// 单例
+ (instancetype)sharedManager;

// 加载配置
- (BOOL)loadSettingsFromPath:(NSString *)path;
- (void)cleanup;

// 设备信息
@property (nonatomic, strong, readonly) NSUUID *idfa;
@property (nonatomic, strong, readonly) NSUUID *idfv;
@property (nonatomic, copy, readonly) NSString *deviceName;
@property (nonatomic, copy, readonly) NSString *osVersion;
@property (nonatomic, copy, readonly) NSString *productStr;
@property (nonatomic, copy, readonly) NSString *hwModel;
@property (nonatomic, assign, readonly) NSUInteger trackingStatus;

// 系统信息
@property (nonatomic, assign, readonly) unsigned long long physicalMemory;
@property (nonatomic, assign, readonly) NSUInteger cpuCore;
@property (nonatomic, assign, readonly) double systemUptimeOffset;
@property (nonatomic, assign, readonly) NSInteger kernBootTimeOffset;

// 电池信息
@property (nonatomic, assign, readonly) UIDeviceBatteryState batteryState;
@property (nonatomic, assign, readonly) float batteryLevel;

// 屏幕信息
@property (nonatomic, assign, readonly) CGFloat screenBrightness;
@property (nonatomic, assign, readonly) CGFloat screenScale;
@property (nonatomic, strong, readonly) NSDictionary *screenBounds;
@property (nonatomic, strong, readonly) NSDictionary *safeAreaInsets;

// 磁盘信息
@property (nonatomic, assign, readonly) unsigned long long diskSize;
@property (nonatomic, assign, readonly) unsigned long long diskFreeSize;

// 音频
@property (nonatomic, assign, readonly) float outputVolume;

// 网络信息
@property (nonatomic, copy, readonly) NSString *userAgent;
@property (nonatomic, strong, readonly) NSDictionary *networkInterfacesInfo;
@property (nonatomic, strong, readonly) NSDictionary *simInfo;

// 本地化
@property (nonatomic, copy, readonly) NSString *locale;
@property (nonatomic, copy, readonly) NSString *timeZone;

// 应用列表
@property (nonatomic, strong, readonly) NSArray *apps;

- (BOOL)shouldHookApp:(NSString *)bundleIdentifier;

@end

// 便捷宏
#define XHookSettings [XHookSettingsManager sharedManager]

