1b987b50fSBen Roth // Copyright 2015-present 650 Industries. All rights reserved.
2b987b50fSBen Roth 
3b987b50fSBen Roth #import "EXScopedEventEmitter.h"
4b987b50fSBen Roth 
5b987b50fSBen Roth @class EXHomeModule;
6b987b50fSBen Roth 
7b987b50fSBen Roth @protocol EXHomeModuleDelegate <NSObject>
8b987b50fSBen Roth 
9b987b50fSBen Roth /**
10b987b50fSBen Roth  *  Whether the kernel JS should show any devtools UI or respond to devtools commands.
11b987b50fSBen Roth  */
12b987b50fSBen Roth - (BOOL)homeModuleShouldEnableDevtools:(EXHomeModule *)module;
13b987b50fSBen Roth 
14b987b50fSBen Roth /**
15b987b50fSBen Roth  *  Dictionary of `key` => `user facing label` items to show in the kernel JS dev menu.
16b987b50fSBen Roth  */
17b987b50fSBen Roth - (NSDictionary <NSString *, NSString *> *)devMenuItemsForHomeModule:(EXHomeModule *)module;
18b987b50fSBen Roth 
1966169681SBen Roth - (BOOL)homeModuleShouldFinishNux:(EXHomeModule *)homeModule;
2066169681SBen Roth - (void)homeModule:(EXHomeModule *)homeModule didFinishNux:(BOOL)isNuxFinished;
2166169681SBen Roth 
22b987b50fSBen Roth - (void)homeModule:(EXHomeModule *)module didSelectDevMenuItemWithKey:(NSString *)key;
23b987b50fSBen Roth - (void)homeModule:(EXHomeModule *)module didOpenUrl:(NSString *)url;
24b987b50fSBen Roth - (void)homeModuleDidSelectRefresh:(EXHomeModule *)module;
25b987b50fSBen Roth - (void)homeModuleDidSelectGoToHome:(EXHomeModule *)module;
262fcba380SBen Roth - (void)homeModuleDidSelectQRReader:(EXHomeModule *)module;
27b987b50fSBen Roth 
28b987b50fSBen Roth @end
29b987b50fSBen Roth 
30b987b50fSBen Roth @interface EXHomeModule : EXScopedEventEmitter
31b987b50fSBen Roth 
32b987b50fSBen Roth - (void)dispatchJSEvent: (NSString *)eventName
33b987b50fSBen Roth                    body: (NSDictionary *)eventBody
34b987b50fSBen Roth               onSuccess: (void (^)(NSDictionary *))success
35b987b50fSBen Roth               onFailure: (void (^)(NSString *))failure;
36b987b50fSBen Roth 
37*24a0cefbSTomasz Sapeta - (void)requestToCloseDevMenu;
38*24a0cefbSTomasz Sapeta 
39b987b50fSBen Roth @end
40