//
//  KBFunctionTagListView.h
//  封装标签列表（UICollectionView）
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class KBFunctionTagListView;

@protocol KBFunctionTagListViewDelegate <NSObject>
@optional
- (void)tagListView:(KBFunctionTagListView *)view didSelectIndex:(NSInteger)index title:(NSString *)title;
@end

@interface KBFunctionTagListView : UIView

@property (nonatomic, weak, nullable) id<KBFunctionTagListViewDelegate> delegate;
@property (nonatomic, strong, readonly) UICollectionView *collectionView;

- (void)setItems:(NSArray<NSString *> *)items;

/// 在指定 index 上显示/隐藏加载指示（若 cell 不可见，内部会记录状态，待出现时应用）
- (void)setLoading:(BOOL)loading atIndex:(NSInteger)index;

@end

NS_ASSUME_NONNULL_END
