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

#import "JCFormSectionItem.h"

@implementation JCFormSectionItem

+ (instancetype)sectionWithItems:(NSArray<JCFormItem *> *)items headerTitle:(nullable NSString *)headerTitle footerTitle:(nullable NSString *)footerTitle {
    JCFormSectionItem *item = [[self alloc] init];
    if (items.count) {
        [item.items addObjectsFromArray:items];
    }
    item.headerTitle = headerTitle;
    item.footerTitle = footerTitle;
    
    return item;
}

- (NSMutableArray<JCFormItem *> *)items {
    if (!_items) {
        _items = [NSMutableArray array];
    }
    return _items;
}

@end
