//
//  DocumentViewController.h
//  EAMNext
//
//  Created by Divya Sivakumar on 6/6/16.
//
//

#import "RecordViewController.h"
#import "BaseRecordViewController.h"
#import <UIKit/UIKit.h>
#import "Utility.h"
#import "R5EVENTS.h"
#import "R5OBJECTS.h"
#import "R5NONCONFORMITIESHEADER.h"
#import "R5MOBILENOTEBOOKS.h"
#import "R5NONCONFORMITIES.h"
#import <AVKit/AVKit.h>
#import <QuickLook/QuickLook.h>
#import "QLPreviewCustomItem.h"
#import "R5PERMITTOWORK.h"
#import "R5PERMITTOWORKLOTO.h"
#import <WebKit/WebKit.h>
@class EAMAppDelegate;
@class R5DOCUMENTS;
@class DocumentsDataController;

@interface DocumentViewController : BaseRecordViewController<UIScrollViewDelegate, RecordViewDelegate, UIImagePickerControllerDelegate,UINavigationControllerDelegate, UIPopoverControllerDelegate,WKNavigationDelegate>
{
    
}

@property (nonatomic, strong)               UIImage                 *encodedImage;
@property (nonatomic, strong)               NSData                  *encodedVideoData;
@property (nonatomic, strong)               R5DOCUMENTS             *currentRecord;
@property (nonatomic, strong)               NSArray                 *documentList;  //Passing List for Prev/Next Navigation
@property (nonatomic)                       int                     documentIndex;
@property (nonatomic, strong)               DocumentsDataController *documentsDataController;
@property (nonatomic, strong)               RecordViewController    *recordViewController;
@property (nonatomic, strong)               NSString                *workOrderNumber;
@property (nonatomic, strong)               NSString                *equipmentNumber;
@property (nonatomic, strong)               NSString                *equipmentOrg;
@property (nonatomic, strong)               NSString                *department;
@property (nonatomic, strong)               NSString                *nonConformityCode;
@property (nonatomic, strong)               NSString                *mobileNotebookCode;
@property (nonatomic, strong)               UIButton                *saveButton;
@property (nonatomic, strong)               UILabel                 *noDocuments;
@property (nonatomic, strong)               UIImageView             *imageView;
@property (nonatomic, retain)               UIView               *documentView;

@property (nonatomic, retain)               WKWebView               *documentWebView;

@property (nonatomic, retain)               UITextField             *descTxt;
@property (nonatomic, strong)               NSString                *fileData;
@property (nonatomic, strong)               NSString                *docName;
@property (nonatomic, strong)               UIView                  *docContainerWebView;
@property (nonatomic, strong)               UIView                  *containerWebView;
@property (nonatomic        )               BOOL                    isCreateWorkRequestScreen;; //WorkRequest Document upload enhancement
@property (nonatomic, weak)                 id                      delegate;
@property (nonatomic, strong)               R5EVENTS                *workOrder;
@property (nonatomic, strong)               R5OBJECTS               *equipment;
@property (nonatomic, strong)              R5MOBILENOTEBOOKS       *mobileNoteBook;
@property (nonatomic, strong)               R5NONCONFORMITIESHEADER       *nonConformity;
@property (nonatomic, strong)               R5NONCONFORMITIES       *nonConformObservation;
@property (nonatomic, strong)               R5PERMITTOWORK       *permitToWork;
@property (nonatomic, strong)               R5PERMITTOWORKLOTO   *permitToWorkLoto;

@property (nonatomic, strong)               NSMutableDictionary               *videoSizeDict;
@property (nonatomic, strong)               NSDictionary                      *encodePhotoNotificationObj;
// Adding the following properties to make this panel more generic
@property (nonatomic, strong)               NSString                *entity;
@property (nonatomic, strong)               NSString                *codeNumber;
@property (nonatomic, strong)               NSString                *functionType;
@property (nonatomic        )               BOOL                    generateDocumentDesc;
@property (nonatomic        )               BOOL                    openedFromRecordView;
- (IBAction)textFieldDidFinishEditing:(id)sender;
@end
