//
//  BaseScreen.h
//  EAMNext
//
//  Created by Ram Madichetty on 4/27/16.
//
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "UIUtil.h"

typedef enum
{
    ScreenTypeListItem,
    ScreenTypePanel
}ScreenType;

@interface ScreenRenderer : NSObject

@property (nonatomic, strong) id model;
@property (nonatomic, weak) id observer;
@property (nonatomic, readonly) int rootViewHeight;
@property (nonatomic) BOOL showLayout;
@property (nonatomic) BOOL showMultiLine;
@property (nonatomic) BOOL designMode;
@property (nonatomic, strong) NSMutableDictionary *screenJSON;
@property (nonatomic, strong) NSMutableDictionary *screenDesignerJSON;

-(id)initWithScreen:(NSString *)screen;
-(id)initWithScreen:(NSString *)screen withObserver:(id)observer;
-(id)initWithScreenConfig:(NSString *)screenConfig;

-(void)updateField:(NSString *)field withValue:(NSString *)value;
-(void)updateField:(NSString *)field withStyle:(NSString *)style;
-(UIView *)getField:(NSString *)field;

-(void)renderScreenOnView:(UIView *)view;
-(void)hideSection:(int )section;
-(void)showSection:(int )section;
-(void)hideField:(NSString *)field;
-(void)showField:(NSString *)field;
-(void)updateField:(NSString *)field withLayout:(Layout *)layout;
-(bool) isHidden :(NSString *) pField;

-(void)refresh;
- (void)resetScreenConfig;

@end


