//
//  MVMCoreUICommonViewsUtility.h
//  myverizon
//
//  Created by Scott Pfeil on 12/16/14.
//  Copyright (c) 2014 Verizon Wireless. All rights reserved.
//
//  Returns views used commonly in Mobile First

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <MVMCoreUI/MFCustomButton.h>

@class PrimaryButton;
@class CustomTextView;

@interface MVMCoreUICommonViewsUtility : NSObject

+ (nonnull UIView *)commonView;

#pragma mark - 2.0 labels

+ (nonnull UILabel *)commonLabelH1;
+ (nonnull UILabel *)commonLabelH2;
+ (nonnull UILabel *)commonLabelH3;
+ (nonnull UILabel *)commonLabelH32;
+ (nonnull UILabel *)commonLabelB1;
+ (nonnull UILabel *)commonLabelB2;
+ (nonnull UILabel *)commonLabelB3;

#pragma mark - Labels

// Creates and returns common labels
+ (nonnull UILabel *)label;

#pragma mark - Text Field

// Adds a picker view to the textfield
+ (nonnull UIPickerView *)addPickerToTextField:(nonnull UITextField *)textField delegate:(nullable id <UITextFieldDelegate,UIPickerViewDelegate,UIPickerViewDataSource>)delegate;

// Adds a date picker to the textfield
+ (nonnull UIDatePicker *)addDatePickerToTextField:(nonnull UITextField *)textField;

+ (nonnull UIDatePicker *)addTimeDatePickerToTextField:(nonnull UITextField *)textField;

#pragma mark - Text View

// Creates and returns a common form textView, which will detect html tags, links.
+ (nonnull UITextView *)commonFormTextView;

// will setup data detector types for textview on the basis of device
// For example: iPad should not detect phone number link
+ (void)setDataDetectorTypesForTextView:(nonnull UITextView *)textView;

#pragma mark - Buttons

//add the close button (x) to the top left of the view, return the button
//@param view: the view to add the close button, it will add to the top right cornor as defult, pass in nil if you only want the reference to the button but not adding it to any view
//if verticalCentered is true, the button will pin to the vertical center of the view instead of top right
+ (nonnull MFCustomButton *)addCloseButtonToView:(nullable UIView *)view action:(nonnull ButtonTapBlock)actionBlock verticalCentered:(BOOL)verticalCentered;

#pragma mark - Toolbar

// seperate this to its own function to reuse while keeping styling the same.
+ (nonnull UIToolbar *)makeEmptyToolbar;

// Adds a toolbar to the keyboard that pops up for the passed in field with a button to dismiss.
+ (void)addDismissToolbar:(nonnull UITextField *)textField delegate:(nullable id <UITextFieldDelegate>)delegate;

// Adds a toolbar to the keyboard that pops up for the passed in text view with a button to dismiss.
+ (void)addDismissToolbarToTextView:(nonnull UITextView *)textView delegate:(nullable id <UITextViewDelegate>)delegate;

#pragma mark - Others

//2.0

+ (nullable UIPickerView *)commonPickerView;

// Creates, pins, and returns a safe area view for the passed in view.
+ (nullable UIView *)getAndSetupSafeAreaViewOnView:(nonnull UIView *)view;

#pragma mark - shadows 

+ (void)drawBottomCurvedShadowsOnRect:(CGRect)rect toView:(nullable UIView *)view;

@end
