//
//  PPCDManager.h
//  PPCashDeskSDK
//
//  Created by 刘晓祥 on 2026/1/4.
//


#import <Foundation/Foundation.h>
// 兼容框架导入和源码导入
#if __has_include(<PPCashDeskSDK/PPCDCommon.h>)
#import <PPCashDeskSDK/PPCDCommon.h>
#import <PPCashDeskSDK/PPCDConfig.h>
#else
#import "PPCDCommon.h"
#import "PPCDConfig.h"
#endif

NS_ASSUME_NONNULL_BEGIN

/// PingPong收银台管理类
@interface PPCDManager : NSObject

/// 获取单例实例
+ (instancetype)sharedInstance;

/// sdk的版本
+ (NSString *)sdkVersion;

/// 收银台配置参数
@property(nonatomic,strong)PPCDConfig *config;

/// 初始化并唤起收银台
/// - Parameters:
///   - token: 交易Token
///   - completed: 完成回调
///   - failure: 失败回调
///   - cancel: 取消回调
-(void)initWithToken:(NSString *)token completed:(void(^)(NSString *code))completed failure:(void(^)(NSError *error))failure cancel:(void(^)(NSInteger code))cancel;


/// 获取当前网络环境
-(PPCDEnvironmentType)getCurrentEnvironment;

/// 读取当前Log日志
-(NSString *)readCurrentLog;

/// 清理所有日志
-(void)clearAllCurrentLog;

@end

NS_ASSUME_NONNULL_END
