//
//  TreeViewViewController.h
//  EAMNext
//
//  Created by Chris Snow on 12/11/17.
//


#import <UIKit/UIKit.h>
#import "LOVData.h"
#import "Utility.h"
#import "TreeViewDataWebService.h"
#import "EAMBasePopoverViewController.h"
#import "TreeViewData.h"
#import "TreeNode.h"
#import "TreeViewCell.h"

@protocol TreeViewControllerDelegate <NSObject>
@optional
- (void)dismissTreeView;
- (void)selectedTreeViewValue:(NSString *)lovName andValues:(NSArray *)data;
@end


@interface TreeViewController : UITableView<UITableViewDataSource,UITableViewDelegate,CellSelectedDelegate, TreeViewControllerDelegate>  {
    
    TreeViewDataWebService *treeViewWebService;
    TreeNode *treeNode;
    
    NSArray* fieldList;
    NSMutableArray *dataList;
    BOOL disconnected;
    BOOL moreDataOnServer;
    
    NSString *searchValue;
}

@property (nonatomic,retain) TreeViewData *treeViewData;
@property (assign) id<TreeViewControllerDelegate> delegate;
@property (nonatomic,retain) NSString *searchValue;

@property (nonatomic,assign) BOOL showDoneButton;
@property (nonatomic,assign) BOOL allowMultipleSelection;
@property (nonatomic,assign) BOOL showConnectedModeData;

@property(nonatomic,retain)NSMutableDictionary *cat;
@property(nonatomic,retain)UIFont *treeViewFont;
@property(nonatomic,retain)NSMutableArray *selectedArray;
@property(nonatomic,retain)NSString *selectedText;

//- (void)woListDataRefreshed:(NSArray *)data;
-(void)downloadTreeViewDataFrom:(NSInteger)position;
-(id)initWithFrame:(CGRect)frame andData:(NSMutableDictionary *)dict;
-(void)setTreeViewFont:(UIFont *)font;
-(NSString *)getSelectedValue;
@end
