//
//  UIUtil.h
//  EAMNext
//
//  Created by Ram Madichetty on 4/22/16.
//
//

#import <Foundation/Foundation.h>

#import "UIView+Layout.h"
#import "StackView.h"
#import <MapKit/MapKit.h>
#import <WebKit/WebKit.h>


@class StackView;
@class RangeSlider;

@interface UIUtil : NSObject

+ (StackView *)createRootVerticalStackView;
+ (StackView *)createContentStackView;
+ (StackView *)createHorizontalStackView;
+ (StackView *)createVerticalStackView;
+ (UIView *)createPanelView;
+ (UIScrollView *)createScrollview;
+ (WKWebView *)createWebView;
+ (WKWebView *)createWKWebView;
+ (UILabel *)createLabel;
+ (UIButton *)createButton;
+ (UITextField *)createTextField;
+ (UITableView *)createTableView;
+ (UISearchBar *)createSearchBar;
+ (UIPickerView *)createPickerView;
+ (UIDatePicker *)createDatePicker;
+ (UITextView *) createTextView;
+ (MKMapView *) createMapView;
+ (UICollectionView *) createCollectionViewWithViewLayout:(UICollectionViewLayout *)flowLayout;
+ (UISwitch *) createSwitchwithEvent:(NSString *)event withTarget:(id)target;

+ (UIImageView *)createImageViewWithLayoutFormat:(NSString *)layoutFormat;
+ (UILabel *)createLabel:(NSString *)value WithLayoutFormat:(NSString *)layoutFormat WithStyleFormat:(NSString *)styleFormat;
+ (UIButton *)createButton:(NSString *)value WithLayoutFormat:(NSString *)layoutFormat WithStyleFormat:(NSString *)styleFormat withEvent:(NSString *)event withTarget:(id)target;
+ (UITextField *)createTextField:(NSString *)value WithLayoutFormat:(NSString *)layoutFormat WithStyleFormat:(NSString *)styleFormat;
+(UISegmentedControl *)createSegmentedControl;

+ (void)updateLabel:(UILabel *)label WithStyleFormat:(NSString *)styleFormat;
+ (NSString *)getStyleFormatForStyle:(NSString *)style;
+ (NSString *)getLayoutFormatForLayout:(NSString *)layout;
+ (UIColor *)colorwithHexString:(NSString *)hexStr alpha:(CGFloat)alpha;
+ (UIColor *)colorWithName:(NSString *)color darkness:(NSInteger)darkness;

+ (void)setMarginWithFormat:(NSString *)marginFormat forView:(id)label;
+ (void)setLayoutFormat:(NSString *)layoutFormat forView:(UIView *)view;

+(UILabel *)createEmptyListLabel;
+(UINavigationBar *)createNavBar;
+ (UISlider *)createSlider;
+ (RangeSlider *)createRangeSlider;

@end
