//
//  PSTableModel.h
//  ArmorP3V1
//

#import <Foundation/Foundation.h>
#import "PSTableSection.h"

typedef enum{
    PS_SELECTABLE_NONE, PS_SELECTABLE_SINGLE, PS_SELECTABLE_MULTI, PS_SELECTABLE_PERSECTION
}PS_TABLE_SELECTABLE;

@interface PSTableModel : NSObject {
    NSMutableArray* _listSection;
}

@property (nonatomic, assign) PS_TABLE_SELECTABLE selectable;

-(int)count;
-(id)getSectionAtIndex:(NSInteger)index;
-(id)getSection:(NSString*)sectionName: (BOOL)createWhenEmpty;
-(void)removeSection:(NSString*)sectionName;

-(id)elementOfValue:(NSInteger)section: (NSObject*)value;
-(id)elementOfInteger:(NSInteger)section: (NSInteger)value;

-(id)selectedElement;
-(void)selectOneElement:(id)elem:(BOOL)selected;

-(void)ListupSelectedElment:(NSMutableArray*)listElement;

-(id)easyAddObject:(NSString*)section:(NSString*)text:(NSObject*)value;
-(id)easyAddInteger:(NSString*)section:(NSString*)text:(NSInteger)valueOfInteger;

-(id)easyFindByObject:(NSObject*)value;
-(id)easyFindByInteger:(NSInteger)valueOfInteger;

-(id)easyElementByIndex:(NSInteger)section:(NSInteger)row;

-(void)mergeSectionsFromTable:(PSTableModel*) model2;

-(void)validate;

@end
