//
//  KBKeyBoardMainView.h
//  CustomKeyboard
//
//  Created by Mac on 2025/10/28.
//

#import <UIKit/UIKit.h>


@class KBKeyBoardMainView, KBKey;

NS_ASSUME_NONNULL_BEGIN

@protocol KBKeyBoardMainViewDelegate <NSObject>
@optional
/// 键被点击的回调
- (void)keyBoardMainView:(KBKeyBoardMainView *)keyBoardMainView didTapKey:(KBKey *)key;

/// 顶部工具栏按钮点击回调（index: 0~3）。
/// 需求：当 index == 0 时，由外部（KeyboardViewController）决定是否切换到功能面板
- (void)keyBoardMainView:(KBKeyBoardMainView *)keyBoardMainView didTapToolActionAtIndex:(NSInteger)index;

/// 点击了右侧设置按钮
- (void)keyBoardMainViewDidTapSettings:(KBKeyBoardMainView *)keyBoardMainView;
@end

@interface KBKeyBoardMainView : UIView
@property (nonatomic, weak) id<KBKeyBoardMainViewDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
