//
//  XXGFloatView.h
//  XXGPlayKit
//
//  Created by apple on 2025/3/13.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, XXGFloatViewEdge) {
    XXGFloatViewEdgeNone,
    XXGFloatViewEdgeTop,
    XXGFloatViewEdgeLeft,
    XXGFloatViewEdgeRight,
    XXGFloatViewEdgeBottom
};

@interface XXGFloatView : UIControl

/// 类方法获取单例（唯一实例）
+ (instancetype)shared;

+ (void)xxpk_show;

/// 显示悬浮按钮（带默认图片）
+ (void)xxpk_showWithImage:(UIImage *)image;

/// 更新悬浮按钮图片
+ (void)xxpk_updateImage:(UIImage *)image edgeImage:(nullable UIImage *)edgeImage;

/// 隐藏悬浮按钮
+ (void)xxpk_hide;

/// 是否正在显示
+ (BOOL)xxpk_isShowing;

/// 点击回调
@property (nonatomic, copy) void(^xxpk_tapHandler)( NSString * _Nullable url);

@property (nonatomic, strong) NSDictionary *xxpk_redotJson;

@end

NS_ASSUME_NONNULL_END
