//
//  JCFormItem.h
//  EZOpenSDKDemo
//
//  Created by JuneCheng on 2026/3/12.
//  Copyright © 2026 hikvision. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface JCFormItem : NSObject

/** 主标题 */
@property (nonatomic, copy) NSString *title;
/** 主标题的字体 */
@property (nonatomic, strong) UIFont *titleFont;
/** 主标题的颜色 */
@property (nonatomic, strong) UIColor *titleColor;

/** 副标题 */
@property (nonatomic, copy) NSString *subTitle;
/** 副标题的字体 */
@property (nonatomic, strong) UIFont *subTitleFont;
/** 副标题的颜色 */
@property (nonatomic, strong) UIColor *subTitleColor;
/** 副标题行数限制 */
@property (nonatomic, assign) NSInteger subTitleNumberOfLines;

/** 左边的图片 UIImage 或者 NSURL 或者 URLString 或者 ImageName */
@property (nonatomic, strong) id image;
/** 是否是必选填，左边的*号 */
@property (nonatomic, assign) BOOL isRequired;

/** 设置cell的高度, 默认44 */
@property (nonatomic, assign) CGFloat cellHeight;


/** 是否自定义这个cell , 如果自定义, 则在tableview返回默认的cell, 自己需要自定义cell返回 */
@property (assign, nonatomic, getter=isNeedCustom) BOOL needCustom;

/** 点击操作 */
@property (nonatomic, copy) void(^itemClick)(NSIndexPath *indexPath);

+ (instancetype)itemWithTitle:(NSString *)title subTitle:(nullable NSString *)subTitle;

+ (instancetype)itemWithTitle:(NSString *)title subTitle:(nullable NSString *)subTitle itemClick:(void(^)(NSIndexPath *indexPath))itemClick;

@end

NS_ASSUME_NONNULL_END
