//
//  MVMCoreObject.h
//  MVMCore
//
//  Created by Pfeil, Scott Robert on 11/21/17.
//  Copyright © 2017 myverizon. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MVMCore/MVMCoreSessionObject.h>
#import <MVMCore/MVMCoreCache.h>
#import <MVMCore/MVMCoreViewControllerMappingObject.h>
#import <MVMCore/MVMCoreActionHandler.h>
#import <MVMCore/MVMCoreSessionTimeHandler.h>
#import <MVMCore/MVMCoreGlobalLoadProtocol.h>
#import <MVMCore/MVMCoreLoadingOverlayDelegateProtocol.h>
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
#import <MVMCore/MVMCoreGlobalTopAlertDelegateProtocol.h>
#import <MVMCore/MVMCoreLoggingHandler.h>

@interface MVMCoreObject : NSObject

@property (nullable, strong, nonatomic) MVMCoreSessionObject *session;
@property (nullable, strong, nonatomic) MVMCoreCache *cache;
@property (nullable, strong, nonatomic) MVMCoreViewControllerMappingObject *viewControllerMapping;
@property (nullable, strong, nonatomic) MVMCoreActionHandler *actionHandler;
@property (nullable, strong, nonatomic) MVMCoreSessionTimeHandler *sessionHandler;

// The delegates
@property (nullable, strong, nonatomic) id <MVMCoreGlobalLoadProtocol> globalLoadDelegate;
@property (nullable, strong, nonatomic) id <MVMCoreLoadingOverlayDelegateProtocol> loadingProtocol;
@property (nullable, strong, nonatomic) NSObject <MVMCoreLoggingDelegateProtocol> *loggingDelegate;
@property (nullable, strong, nonatomic) id <MVMCoreGlobalTopAlertDelegateProtocol> globalTopAlertDelegate;

// A reference to the calling application delegate that should be set. For a normal app, could be the UIApplicationDelegate. For watch, could be WKExtensionDelegate. For iMessage, could be MSMessagesAppViewController. etc, etc. Useful for the framework to call delegate specific functions.
@property (nullable, weak, nonatomic) id applicationDelegate;

// A singleton.
+ (nullable instancetype)sharedInstance;

// Sets up with a default session, cache, view controller mapping, action handler, session handler, and logging delegate.
- (void)defaultInitialSetup;

@end
